Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ebrains-spack-builds
Manage
Activity
Members
Labels
Plan
Issues
30
Issue boards
Milestones
Wiki
Code
Merge requests
30
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
EBRAINS RI
Tech Hub
Platform
EBRAINS Software Distribution
ebrains-spack-builds
Commits
46516cfb
Commit
46516cfb
authored
1 month ago
by
Eric Müller
Browse files
Options
Downloads
Patches
Plain Diff
fix(jaxsnn): tests when using modern jax
parent
2116c57c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!655
Draft: Fix py-{jax{,lib},tensorflow}+cuda
Pipeline
#60792
failed with stage
Stage:
in 4 hours, 6 minutes, and 13 seconds
Changes
2
Pipelines
1
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 @
46516cfb
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/tests/sw/event/hardware/utils_test.py
+++ b/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/tests/sw/event/tasks/constant_test.py
+++ b/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 @
46516cfb
...
@@ -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:
"
)
def
install_test
(
self
):
def
install_test
(
self
):
with
working_dir
(
'
spack-test
'
,
create
=
True
):
with
working_dir
(
'
spack-test
'
,
create
=
True
):
...
...
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