Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the jax random number generator key for 32-bit python #833

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

tjburch
Copy link
Contributor

@tjburch tjburch commented Aug 21, 2024

Resolves #832. See that issue for a full explanation, but long-story-short, the current value of 2**32-1 yields an overflow error in 32-bit python.

In theory we can do 2**31 and not 2**31-1 if we would like, the former seems to run without issue as well, I just kept with the -1 to be consistent with the current implementation.

Resolves bambinos#832. In theory we can do `2**31` and not `2**31-1` if we would like, the latter seems to run without issue as well, I just kept with the `-1` to be consistent with the current implementation
@tjburch tjburch changed the title Change the jax random number generator key for 32 bit systems Change the jax random number generator key for 32-bit python Aug 21, 2024
@tomicapretto
Copy link
Collaborator

I'm running CI again. I don't understand why it was cancelled...

@codecov-commenter
Copy link

codecov-commenter commented Aug 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.94%. Comparing base (4cc3103) to head (79176a4).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #833      +/-   ##
==========================================
- Coverage   90.01%   89.94%   -0.08%     
==========================================
  Files          47       47              
  Lines        3967     3969       +2     
==========================================
- Hits         3571     3570       -1     
- Misses        396      399       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tomicapretto tomicapretto merged commit 20302bc into bambinos:main Aug 26, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Integer overflow when running alternative backends on 32-bit python
3 participants