-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[RLlib] AlgorithmConfig.update_from_dict
needs to work for MultiCallbacks.
#33796
Conversation
Signed-off-by: Jun Gong <jungong@anyscale.com>
Signed-off-by: Jun Gong <jungong@anyscale.com>
value = deserialize_type(value, error=True) | ||
# For backward compatibility reasons, only resolve possible | ||
# classpath if value is a str type. | ||
if isinstance(value, str): |
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 just do error=False
here instead of the if block?
This way, if value is already a class, nothing will happen.
AlgorithmConfig.update_from_dict
needs to work for MultiCallbacks.
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 now. Thanks for the fix @gjoliver . We should generally discuss, whether - instead of the current __call__
-hack for MultiCallbacks, we should force users to write a light sub-class wrapper around MultiCallbacks with baked-in sub-callbacks (instead of handing the sub-callbacks as classes to the constructor).
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.
Approved for merging into master (we are under feature freeze now but this is critical fix)
…lbacks. (ray-project#33796) Signed-off-by: Jun Gong <jungong@anyscale.com> Signed-off-by: sven1977 <svenmika1977@gmail.com> Co-authored-by: sven1977 <svenmika1977@gmail.com> Signed-off-by: elliottower <elliot@elliottower.com>
…lbacks. (ray-project#33796) Signed-off-by: Jun Gong <jungong@anyscale.com> Signed-off-by: sven1977 <svenmika1977@gmail.com> Co-authored-by: sven1977 <svenmika1977@gmail.com> Signed-off-by: Jack He <jackhe2345@gmail.com>
Why are these changes needed?
This breaks existing users who use MultiCallbacks instances.
Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.