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

Decide numpy version based on platform #234

Closed
wants to merge 1 commit into from

Conversation

sibocw
Copy link
Contributor

@sibocw sibocw commented Feb 5, 2025

  1. The latest versions of NumPy do not support macOS with Apple Silicon chips (see torch=2.2.2 is the max supported version for intel macs which is incompatible with numpy>=2 #231).
  2. Even with NumPy 2.2.2, I'm having problems with Apple silicon Macs: see CI run at https://github.com/NeLy-EPFL/flygym/actions/runs/13161898909/job/36732489897. Note the following strange errors:
RuntimeError: Could not infer dtype of numpy.float32
RuntimeError: Numpy is not available

Therefore, here I tried to conditionally specify using NumPy 1.* for Apple Silicon Macs and NumPy 2.* otherwise. This is similar to @Dominic-DallOsto's commit 376fe72, but now that we have moved from setup.py to pyproject.yaml, we need to redo it in pyproject.yaml.

However, this made the dependency resolution process (poetry lock) EXTREMELY slow (~35 minutes instead of a few seconds). I don't know why. Until we figure it out, I suggest that we just require numpy<2.0 for all platforms. The aim of this PR is therefore to retain what I changed but not to merge it into ongoing v1.2.0 development.

Does this address any currently open issues?

#231

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant