Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ebrains-spack-builds
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Willem Wybo
ebrains-spack-builds
Commits
b7e606ea
Commit
b7e606ea
authored
3 months ago
by
Eric Müller
Committed by
Eleni Mathioulaki
1 month ago
Browse files
Options
Downloads
Patches
Plain Diff
fix(jaxsnn): tests when using modern jax
parent
1e7f42c1
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/jaxsnn/newjax.patch
+41
-0
41 additions, 0 deletions
packages/jaxsnn/newjax.patch
packages/jaxsnn/package.py
+1
-0
1 addition, 0 deletions
packages/jaxsnn/package.py
with
42 additions
and
0 deletions
packages/jaxsnn/newjax.patch
0 → 100644
+
41
−
0
View file @
b7e606ea
From d12ff24ccb39f861067661b01973862e83552baf Mon Sep 17 00:00:00 2001
From: Elias Arnold <elias.arnold@kip.uni-heidelberg.de>
Date: Mon, 31 Mar 2025 15:13:03 +0200
Subject: [PATCH] fix: tests for new jax
Change-Id: I278454c7a51c0c15071a7ab8496a9655c52ff495
---
diff --git a/tests/sw/event/hardware/utils_test.py b/tests/sw/event/hardware/utils_test.py
index ab73452..0753947 100644
--- a/jaxsnn/tests/sw/event/hardware/utils_test.py
+++ b/jaxsnn/tests/sw/event/hardware/utils_test.py
@@ -15,12 +15,12 @@
rng = random.PRNGKey(42)
with_noise = add_noise_batch(spikes, rng, std=1)
assert_array_equal(
- with_noise.idx, np.array([[0, 1, 2, 5, 3, 4, 6, 7, 8, 9]])
+ with_noise.idx, np.array([[0, 1, 2, 3, 4, 6, 5, 7, 8, 9]])
)
with_noise = add_noise_batch(spikes, rng, std=3)
assert_array_equal(
- with_noise.idx, np.array([[2, 1, 0, 5, 6, 7, 3, 4, 8, 9]])
+ with_noise.idx, np.array([[0, 6, 1, 2, 3, 4, 5, 7, 8, 9]])
)
def test_sort_batch(self):
diff --git a/tests/sw/event/tasks/constant_test.py b/tests/sw/event/tasks/constant_test.py
index be82deb..a7906af 100644
--- a/jaxsnn/tests/sw/event/tasks/constant_test.py
+++ b/jaxsnn/tests/sw/event/tasks/constant_test.py
@@ -52,7 +52,7 @@
)
# init weights
- rng = random.PRNGKey(42)
+ rng = random.PRNGKey(45)
weights = init_fn(rng, input_shape)
loss_fn = partial(
This diff is collapsed.
Click to expand it.
packages/jaxsnn/package.py
+
1
−
0
View file @
b7e606ea
...
@@ -46,6 +46,7 @@ class Jaxsnn(build_brainscales.BuildBrainscales):
...
@@ -46,6 +46,7 @@ class Jaxsnn(build_brainscales.BuildBrainscales):
extends
(
'
python
'
)
extends
(
'
python
'
)
patch
(
"
include-SparseTensorUtils.patch
"
,
when
=
"
@:8.0-a5
"
)
patch
(
"
include-SparseTensorUtils.patch
"
,
when
=
"
@:8.0-a5
"
)
patch
(
"
newjax.patch
"
,
when
=
"
@:10.0-a1 ^py-jax@0.5:
"
)
patch
(
"
fix-multi-site-packages.patch
"
,
when
=
"
@:10.0-a1
"
)
patch
(
"
fix-multi-site-packages.patch
"
,
when
=
"
@:10.0-a1
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment