-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[Tune] Nevergrad optimizer with extra parameters #31015
[Tune] Nevergrad optimizer with extra parameters #31015
Conversation
Signed-off-by: yhna <[email protected]>
Signed-off-by: yhna <[email protected]>
Signed-off-by: yhna <[email protected]>
080aeec
to
8ca32d0
Compare
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
|
. |
cc @justinvyu can you help shepherd this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this contribution! I have a few minor suggestions, and a note about the failing test:
We should fix this test. Currently, it's passing in a parameter_names
argument that's not being used at all and is being filled in as the optimizer_kwargs
, causing the error. We should just remove this.
class NevergradWarmStartTest(AbstractWarmStartTest, unittest.TestCase): |
Also, while we're at it, can we not accept **kwargs
in the NevergradSearch
constructor? It's currently not used at all and would create some confusion between the added optimizer_kwargs
and the regular kwargs
.
|
||
out = tune.run( | ||
_invalid_objective, | ||
search_alg=NevergradSearch( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we limit the test to just the searcher initialization? Just making sure that initializing NevergradSearch
with an optimizer that requires args without erroring should be good enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I totally agree with you. Therefore, for this test case, only verify that nevergrad is instantiated. thanks.
Co-authored-by: Justin Yu <[email protected]> Signed-off-by: YH <[email protected]>
Co-authored-by: Justin Yu <[email protected]> Signed-off-by: YH <[email protected]>
Signed-off-by: Younghwan Na <[email protected]>
63908a9
to
c0d6338
Compare
Fixed by specifying |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
In my comment early, I meant removing this **kwargs
entirely and not passing it into the super().__init__()
. The base Searcher
class doesn't actually take in any args other than metric
and mode
, so it's not needed. Sorry for the confusion!
Could you also merge with the latest master? (Make sure not to rebase! It will introduce a bunch of commits to this PR.)
Co-authored-by: Justin Yu <[email protected]> Signed-off-by: YH <[email protected]>
Co-authored-by: Justin Yu <[email protected]> Signed-off-by: YH <[email protected]>
Co-authored-by: Justin Yu <[email protected]> Signed-off-by: YH <[email protected]>
Co-authored-by: Justin Yu <[email protected]> Signed-off-by: YH <[email protected]>
Co-authored-by: Justin Yu <[email protected]> Signed-off-by: YH <[email protected]>
Signed-off-by: yhna940 <[email protected]>
Thank you for your review. There were 3 major changes.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution! I am retrying a few of the failed tests - they shouldn't be affected by these changes. Should be good to merge after they pass!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Why are these changes needed?
Some Nevergrad search algorithms have required inputs, such as
budget
for theNgOpt
search algorithm, but it is not possible with the NevergradSearch class to pass these parameters down to the search algorithm. I would propose adding something like optimizer_kwargs to the NevergradSearch that get passed to the optimizer when instantiating it.Related issue number
#26305
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.