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

Ax pulling numpy 2.0 with breaking changes #2524

Closed
leandrobbraga opened this issue Jun 17, 2024 · 3 comments
Closed

Ax pulling numpy 2.0 with breaking changes #2524

leandrobbraga opened this issue Jun 17, 2024 · 3 comments
Assignees

Comments

@leandrobbraga
Copy link
Contributor

leandrobbraga commented Jun 17, 2024

Hello, recently numpy released a new version , which is nice but unfortunately brings many breaking changes.

It seems that Ax is pulling this new version through dependencies which is breaking Ax's own code.

This is an example, but it's probably happening in all sort of places inside the library:

from ax.utils.common.logger import ROOT_LOGGER as AX_LOGGER
/usr/local/lib/python3.11/site-packages/ax/__init__.py:34: in <module>
    from ax.service import OptimizationLoop, optimize
/usr/local/lib/python3.11/site-packages/ax/service/__init__.py:7: in <module>
    from ax.service.managed_loop import OptimizationLoop, optimize
/usr/local/lib/python3.11/site-packages/ax/service/managed_loop.py:32: in <module>
    from ax.service.utils.best_point import (
/usr/local/lib/python3.11/site-packages/ax/service/utils/best_point.py:53: in <module>
    from numpy import NaN
E   ImportError: cannot import name 'NaN' from 'numpy' (/usr/local/lib/python3.11/site-packages/numpy/__init__.py)

As a temporary fix the user can limit numpy version to '<2.0.0', even if they do not depend directly on numpy.

@leandrobbraga leandrobbraga changed the title A pulling numpy 2.0 with breaking changes Ax pulling numpy 2.0 with breaking changes Jun 17, 2024
@bernardbeckerman bernardbeckerman self-assigned this Jun 21, 2024
@bernardbeckerman
Copy link
Contributor

@leandrobbraga thanks for reporting this! We're aware, and this should be fixed as of #2527 - please let us know if using a commit from after this change still gives you issues with numpy 2.0 compatibility.

@sgbaird
Copy link
Contributor

sgbaird commented Jun 26, 2024

@bernardbeckerman do you have an idea of when the next maintenance release of Ax will be? For now, I may just specify numpy<2.0 where appropriate.

@bernardbeckerman
Copy link
Contributor

I think we should be able to prioritize a release in the next couple of weeks! I'm out next week and a bit swamped this week, but I'll raise this with teammates to see if we can prioritize a release soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants