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.
📝 Description
We have a few tests routinely failing at the moment for a handful of reasons mostly relating to numpy 2.
One such error is due to DeepSensor's dependency stheno not yet pinning the version of fdm which repairs some of the numpy compatibility bugs. I've raised a PR in that project here: wesselb/stheno#27
In this PR there are a couple of corrections to alleviate test failures:
np.product
in some tests, this was changed in something like numpy 1.16 tonp.prod
.encoder_scales
was being set to a numpy float32 with numpy 2 (possible relating to https://numpy.org/devdocs/numpy_2_0_migration_guide.html#changes-to-numpy-data-type-promotion) which was causing the saving and loading test to fail. I've added anint()
but unsure if this is appropriate/ideal, though all of the tests pass locally.✅ Checklist before requesting a review
(See the contributing guide for more details on these steps.)
pip install -r requirements/requirements.dev.txt
and runningpre-commit install
(or alternatively, manually runningruff format
before commiting)If changing or adding source code:
pytest
).documentation is included or updated as relevant, including docstrings.