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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add version constraint for Optuna #2163

Merged
merged 2 commits into from
Apr 22, 2022

Conversation

himkt
Copy link
Contributor

@himkt himkt commented Apr 20, 2022

See #2162 for more information.

Motivation

This PR updates the version constraint of Optuna to avoid installing the next major version of Optuna.
See also 馃敆 #2162

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

(How should this PR be tested? Do you require special setup to run the test or repro the fixed bug?)

Related Issues and PRs

#2162

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 20, 2022
Copy link
Collaborator

@Jasha10 Jasha10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much for letting us know about the upcoming Optuna API changes!
Once Optuna 3.0 is released, we can upgrade this sweeper to use the new API.

@@ -27,7 +27,7 @@
],
install_requires=[
"hydra-core>=1.1.0.dev7",
"optuna>=2.10.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you keep the "optuna>=2.10.0" in the meanwhile?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you mean it's enough to track the issue #2162 and not necessary to constrain the version, right? It will show warning messages for users when Optuna v3 is available. Is it OK?

Copy link
Collaborator

@Jasha10 Jasha10 Apr 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just throwing this out there: using multiple constraints on the version should be legal:

    install_requires=[
        ...
        "optuna >= 2.10.0, < 3.0.0",
        ...

The downside of pinning Optuna < 3.0 is that users would not be able to access new Optuna features. Jieru, is that why you were concerned about the pin?

Copy link
Contributor

@jieru-hu jieru-hu Apr 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for the confusion, i should have provided more context. I meant "optuna >= 2.10.0, < 3.0.0"

the current impl assumes the version is >=2.10.0 so it'd be great to keep that still

Copy link
Contributor Author

@himkt himkt Apr 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Jasha10 and @jieru-hu, it makes sense! Sorry for my poor understanding. 4b39011 restore the lower constraint. 馃檵

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you @himkt!

@jieru-hu jieru-hu merged commit 34cc19a into facebookresearch:main Apr 22, 2022
@himkt himkt deleted the optuna-version-constraint branch April 22, 2022 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants