-
Notifications
You must be signed in to change notification settings - Fork 7.1k
[RLlib] Add missing get_ctor_args_and_kwargs methods to all ConnectorV2 built-in classes.
#48698
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] Add missing get_ctor_args_and_kwargs methods to all ConnectorV2 built-in classes.
#48698
Conversation
Signed-off-by: sven1977 <[email protected]>
…ctor_args_and_kwargs_to_all_connector_pieces
Signed-off-by: sven1977 <[email protected]>
simonsays1980
left a comment
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. Maybe a docs change is needed to point this out to users writing their custom connectors.
| return ( | ||
| (), # args, | ||
| { | ||
| "multi_agent": self._multi_agent, |
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.
Okay so each connector must provide its arguments in this method to be correctly checkpointed. We might need to add this to the docs, as this might give users a bad experience, if they forget to add this in their own custom connectors and then run into problems loading their connector checkpoints.
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.
Yeah, great point. Let me try to provide some default implementation, which tries to gather all local variables from the call-frame below super() (the user's custom c'tor that calls super()) ...
Signed-off-by: sven1977 <[email protected]>
…orV2 built-in classes. (ray-project#48698) Signed-off-by: JP-sDEV <[email protected]>
…orV2 built-in classes. (ray-project#48698) Signed-off-by: mohitjain2504 <[email protected]>
Add missing
get_ctor_args_and_kwargsmethods to all ConnectorV2 built-in classes.This is needed if ConnectorV2 pieces and pipelines should be restorable from a checkpoint.
Why are these changes needed?
Related issue number
Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/under thecorresponding
.rstfile.