-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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] Tweak/allow nested pbt mutations #3455
[tune] Tweak/allow nested pbt mutations #3455
Conversation
Test FAILed. |
python/ray/tune/schedulers/pbt.py
Outdated
new_config.update({ | ||
key: explore( | ||
config[key], mutations[key], | ||
resample_probability, custom_explore_fn) |
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.
Should we pass a no-op custom_explore_fn here? It might be weird to be invoking that at multiple levels.
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.
Makes sense not to invoke the custom preturbation function at every level. But instead of passing a no-op, I believe we should pass the custom_explore_fn
as is but only invoke it at the last level? What do you think?
Do you mean the top-most level? Passing as no-op to any nested explore
calls would achieve this I think.
…On Mon, Dec 3, 2018, 10:11 PM Kristian Hartikainen ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In python/ray/tune/schedulers/pbt.py
<#3455 (comment)>:
> @@ -47,7 +47,13 @@ def explore(config, mutations, resample_probability, custom_explore_fn):
"""
new_config = copy.deepcopy(config)
for key, distribution in mutations.items():
- if isinstance(distribution, list):
+ if isinstance(distribution, dict):
+ new_config.update({
+ key: explore(
+ config[key], mutations[key],
+ resample_probability, custom_explore_fn)
Makes sense not to invoke the custom preturbation function at every level.
But instead of passing a no-op, I believe we should pass the
custom_explore_fn as is but only invoke it at the last level? What do you
think?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3455 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAA6SshcWxzIfj-_n79DMtVnCRgJtAaNks5u1hH6gaJpZM4Y9Q2o>
.
|
I did actually mean the bottom-most level, but I do see what you mean. I
was thinking that the custom function would only be applied to the actual
values to be explored. What you mean makes more sense.
…On Mon, Dec 3, 2018, 10:16 PM Eric Liang ***@***.***> wrote:
Do you mean the top-most level? Passing as no-op to any nested explore
calls would achieve this I think.
On Mon, Dec 3, 2018, 10:11 PM Kristian Hartikainen <
***@***.***>
wrote:
> ***@***.**** commented on this pull request.
> ------------------------------
>
> In python/ray/tune/schedulers/pbt.py
> <#3455 (comment)>:
>
> > @@ -47,7 +47,13 @@ def explore(config, mutations,
resample_probability, custom_explore_fn):
> """
> new_config = copy.deepcopy(config)
> for key, distribution in mutations.items():
> - if isinstance(distribution, list):
> + if isinstance(distribution, dict):
> + new_config.update({
> + key: explore(
> + config[key], mutations[key],
> + resample_probability, custom_explore_fn)
>
> Makes sense not to invoke the custom preturbation function at every
level.
> But instead of passing a no-op, I believe we should pass the
> custom_explore_fn as is but only invoke it at the last level? What do you
> think?
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#3455 (comment)>,
or mute
> the thread
> <
https://github.com/notifications/unsubscribe-auth/AAA6SshcWxzIfj-_n79DMtVnCRgJtAaNks5u1hH6gaJpZM4Y9Q2o
>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3455 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACM5v1NSgAZnkofExVebQVxr1qtWDoVBks5u1hMogaJpZM4Y9Q2o>
.
|
Changed. I still need to test this in practice. |
Test FAILed. |
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.
LGTM!
Hey @hartikainen, just ping us when you get the chance to try this out and remove the wip, so we can merge it. |
Looks like a py2 failure:
|
Test FAILed. |
Test FAILed. |
93f491b
to
c8ab02a
Compare
c8ab02a
to
5eef7eb
Compare
Test FAILed. |
Test FAILed. |
Sorry for the delay with this one. I tested this on my end, and the nesting works fine! |
@richardliaw thanks for updating the test mocks! |
Oops, this fell off the radar. No problem; thanks for the contribution! |
What do these changes do?
Changes the population-based training exploration to allow nested mutations
Related issue number
Closes #3412