[RLlib] Add missing get_ctor_args_and_kwargs methods to all ConnectorV2 built-in classes.#48698
Merged
sven1977 merged 4 commits intoray-project:masterfrom Nov 12, 2024
Conversation
…ctor_args_and_kwargs_to_all_connector_pieces
simonsays1980
approved these changes
Nov 12, 2024
Contributor
simonsays1980
left a comment
There was a problem hiding this comment.
LGTM. Maybe a docs change is needed to point this out to users writing their custom connectors.
| return ( | ||
| (), # args, | ||
| { | ||
| "multi_agent": self._multi_agent, |
Contributor
There was a problem hiding this comment.
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.
Contributor
Author
There was a problem hiding this comment.
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()) ...
JP-sDEV
pushed a commit
to JP-sDEV/ray
that referenced
this pull request
Nov 14, 2024
…orV2 built-in classes. (ray-project#48698) Signed-off-by: JP-sDEV <jon.pablo80@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.