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

Prevent numpy >= 2.0.0 #1117

Merged
merged 1 commit into from
Sep 30, 2024
Merged

Conversation

michael-hoss
Copy link
Contributor

numpy 2.0.0 comes with some bigger changes that I think the nuscenes-devkit is not prepared for (there are even problems for larger minor versions within numpy 1 #1055)

So I believe, the best we can do right now to enable a smooth installation of requirements is to at least prevent numpy 2

@whyekit-motional
Copy link
Collaborator

Thanks for this PR @michael-hoss!

Could you describe some examples where numpy 2.x is not playing nice with nuscenes-devkit?

@michael-hoss
Copy link
Contributor Author

Thanks for this PR @michael-hoss!

Could you describe some examples where numpy 2.x is not playing nice with nuscenes-devkit?

Thanks for approving @whyekit-motional!

My issue was the following: I have nuscenes-devkit as a submodule in my own repo. In my own requirements.txt, I also install the devkit's requirements.txt: https://github.com/michael-hoss/perceptest/blob/af209e70e8c0261cb0034a85ed98494a567c2a63/requirements.txt#L5

In a CI unit test that I ran last week, apparently there was a compatibility issue with matplotlib:

https://github.com/michael-hoss/perceptest/actions/runs/11070925233/job/30761621502#step:7:98

A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.1.1 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.

Note that I do use Python 3.10. In the older Python versions that the nuscenes-devkit officially supports, it might install numpy<2 automatically.

@whyekit-motional whyekit-motional merged commit 835ddec into nutonomy:master Sep 30, 2024
@michael-hoss michael-hoss deleted the pin_numpy_1 branch October 9, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants