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

latest release pulls in ax 0.4 #208

Closed
berceanu opened this issue May 10, 2024 · 6 comments
Closed

latest release pulls in ax 0.4 #208

berceanu opened this issue May 10, 2024 · 6 comments

Comments

@berceanu
Copy link
Collaborator

berceanu commented May 10, 2024

Latest stable release of optimas on PyPI (0.5.0 at the time of writing), has an ax dependency specified as ax-platform >= 0.3.4. Right now this pulls in ax 0.4, which doesn't work, on the fbpic example it gives:

ImportError: cannot import name 'manual_seed' from 'ax.service.ax_client' 

In order to avoid this in the future, perhaps the dependencies on ax-platform (and maybe libensemble as well) in pyproject.toml could be narrower, ie limited to 0.4.x instead of >= 0.4.0?

@berceanu berceanu changed the title latest release pulls in ax 4.0 latest release pulls in ax 0.4 May 10, 2024
@AngelFP
Copy link
Member

AngelFP commented May 10, 2024

Hi @berceanu,

Good timing! We were just today preparing a new release (https://github.com/optimas-org/optimas/releases/tag/v0.6.0) that includes support for the latest Ax version (#206). You should already be able to get optimas v0.6.0 from PyPI.

@AngelFP AngelFP closed this as completed May 10, 2024
@berceanu
Copy link
Collaborator Author

Good, now imagine the following scenario: some time from now, Ax releases a new version, which is no longer 100% compatible with optimas 0.6. It would take some time for a new optimas 0.7 release which will be compatible with this new version of Ax, and during this time the users that will install the latest stable optimas will not have a working version, because right now the dependency on Ax is specified as >= 0.4.0 and will always pull the latest.

Or am I missing something?

@AngelFP
Copy link
Member

AngelFP commented May 13, 2024

That's a general question about how to handle dependencies. Do you want to force a particular version, or allow a wider range? The first one gives you a certain peace of mind, but might easily lead to conflicts with other libraries in your environment if they require a different version.

So, I think that in principle we should be as flexible as possible, but all the last few releases of Ax have broken something in optimas (even the small releases like 0.3.5 or 0.3.7, so not even 0.3.x is safe!). Right now we can catch and fix this early because our tests run every day, but we could consider pinning a particlar version for each optimas release.

@AngelFP
Copy link
Member

AngelFP commented May 13, 2024

In any case, imagine that Ax 0.4.1 comes out and breaks something. Even though optimas would install it by default, you can still install 0.4.0 manually.

@berceanu
Copy link
Collaborator Author

Hi @AngelFP, thanks for the detailed reply, you made some very good points. I was not aware that even patch number Ax releases can still break things, I thought one could at least get away with pinning the minor release number, eg 0.3.x of Ax in each optimas release.

@AngelFP
Copy link
Member

AngelFP commented May 13, 2024

My hope is that this will get better in the future. In previous releases we were using some low-level functions from Ax that are probably not meant for everyone, and which were the reason behind some of these issues. We've been slowly moving away from that, so hopefully this will be more robust going forward.

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

2 participants