Skip to content

Conversation

Balandat
Copy link
Contributor

@Balandat Balandat commented Aug 4, 2024

This unpins numpy from <2.0, which was done as a temporary workaround in #2382 to avoid issues with windows builds.

The underlying issue was an incompatibility between pytorch 2.4.0 windows builds and numpy 2.0. Pointed pip to the updated pytorch pip index to pick up newer 2.5.0 dev versions to resolve the issue: #2459 (comment)

There is still the issue of existing torch release windows binaries potentially not being compatible with numpy 2.0, but that shouldn't be something that we need to handle.

This was done in meta-pytorch#2382 to avoid issues with windows builds.
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Aug 4, 2024
Copy link

codecov bot commented Aug 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.98%. Comparing base (e44280e) to head (4d2c1cd).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2459   +/-   ##
=======================================
  Coverage   99.98%   99.98%           
=======================================
  Files         191      191           
  Lines       16795    16795           
=======================================
  Hits        16793    16793           
  Misses          2        2           

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

@Balandat
Copy link
Contributor Author

Balandat commented Aug 4, 2024

I guess this still causes issues, will need to dig deeper.

In CI we were using `pip install torch torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html` whereas the pytorch website sugggests `pip install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu`. Hopefully this will pick up newer nightly builds and resolve the windows numpy compatgibility issue.
@Balandat
Copy link
Contributor Author

Balandat commented Aug 4, 2024

The issue appears to be that the windows binaries for pytorch 2.4.0 are not compatible with numpy>=2.0: pytorch/pytorch#131668.

pytorch/builder#1945 should fix this going forward for the nightly builds in our CI, but fundamentally this isn't actually a botorch issue but a torch/numpy compatibility issue on windows.

I also realized that in our CI we were using pip install torch torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html whereas the pytorch website suggests pip install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu. Making this change; hopefully this will pick up newer nightly builds and resolve the windows numpy compatibility issue.

@Balandat
Copy link
Contributor Author

Balandat commented Aug 4, 2024

Making this change; hopefully this will pick up newer nightly builds and resolve the windows numpy compatibility issue.

This appears to be the case. There is still the issue of existing torch release windows binaries potentially not being compatible with numpy 2.0, but that shouldn't be something that we need to handle.

@facebook-github-bot
Copy link
Contributor

@Balandat has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

1 similar comment
@facebook-github-bot
Copy link
Contributor

@Balandat has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@Balandat merged this pull request in c1b73b8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity. Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants