-
Notifications
You must be signed in to change notification settings - Fork 33
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
deps: Fix issues and enable Numpy 2+ #3219
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Numpy<2 just returns the same generator object: >>> gen_t = (True for i in range(10)) >>> gen_t <generator object <genexpr> at 0x7f2cc27e7880> >>> np.all(gen_t) <generator object <genexpr> at 0x7f2cc27e7880> Numpy2+ converts the generator object to boolean type: >>> gen_t = (False for i in range(10)) >>> gen_t <generator object <genexpr> at 0x7f66ca09f940> >>> np.all(gen_t) np.True_ Call np.all on the comparison of key_weights instead, to make sure Python's "all" gets a 1d iterable. Closes: PrincetonUniversity#3206 Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Arguments to object initialization can contain additional parentheses; e.g. "SampleIterator((1,2,3)) A minimal match (using '*?') is not enough to remove such a construction calls. Use greedy match instead to eliminate the largest parenthesised expression. This fixes recognition of PNL objects constructed using tuples, or object conversions (e.g. [int(x)]) Extend model_with_control.py test to use tuple for allocation samples, which gets converted to SampleIterator using the tuple as constructor argument. Closes: PrincetonUniversity#3207 Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
ENERGY metric can fail as well for certain float32 inputs. Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Instead of opencoding the same functionality. Closes: PrincetonUniversity#3216 Fixes: beebd2a ("Add support for batching to AutoDiffCompostion in PyTorch mode. (PrincetonUniversity#3204)") Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
…hts to integers Numpy doesn't like evaluating boolean values of empty arrays. Numpy <2 issues a warning, Numpy 2 raises an exception. Closes: PrincetonUniversity#3215 Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Updates the requirements on [numpy](https://github.com/numpy/numpy) to permit the latest version. - [Release notes](https://github.com/numpy/numpy/releases) - [Changelog](https://github.com/numpy/numpy/blob/main/doc/RELEASE_WALKTHROUGH.rst) - [Commits](numpy/numpy@v1.21.0...v2.2.3) --- updated-dependencies: - dependency-name: numpy dependency-type: direct:production ... Updates the requirements on [fastkde](https://github.com/LBL-EESA/fastkde) to permit the latest version. - [Release notes](https://github.com/LBL-EESA/fastkde/releases) - [Commits](LBL-EESA/fastkde@v1.0.24...v2.1.3) --- updated-dependencies: - dependency-name: fastkde dependency-type: direct:production ... These dependencies have to be updated in tandem. fastkde-2.0.x doesn't work with Numpy 2 fastkde-2.1.3 doesn't work with Numpy <2 on Windows [0] [0] LBL-EESA/fastkde#53 Signed-off-by: dependabot[bot] <support@github.com>
This PR causes the following changes to the html docs (ubuntu-latest-3.11):
See CI logs for the full diff. |
This PR causes the following changes to the html docs (ubuntu-latest-3.11):
See CI logs for the full diff. |
kmantel
reviewed
Feb 27, 2025
kmantel
approved these changes
Mar 5, 2025
This PR causes the following changes to the html docs (ubuntu-latest-3.11):
See CI logs for the full diff. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Don't call np.all on a generator.
Use greedy regexp match to remove function/construction call arguments.
Use convert_to_np_array helper in AutodiffComposition.
Explicitly check for empty arrays when converting ContentAddressableMemory weights to integers.
Allow the latest numpy and fastkde packages.
Closes: #3205