-
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] Fix ConnectorPipelineV2
restoring from checkpoint (by writing information about individual connector pieces to the ctor_args_and_kwargs
file).
#48213
Merged
sven1977
merged 5 commits into
ray-project:master
from
simonsays1980:make-connector-pipelinev2-a-checkpointable
Oct 27, 2024
Conversation
This file contains 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
…rectly from a checkpoint. Signed-off-by: simonsays1980 <simon.zehnder@gmail.com>
…ensure clean class inheritance. Instead 'get_ctor_args_and_kwargs' returns a list of 3-tuples with class, args, and kwargs to rebuild the connector instances before loading their state. Signed-off-by: simonsays1980 <simon.zehnder@gmail.com>
Signed-off-by: simonsays1980 <simon.zehnder@gmail.com>
sven1977
reviewed
Oct 27, 2024
Signed-off-by: Sven Mika <sven@anyscale.io>
sven1977
approved these changes
Oct 27, 2024
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! Thanks @simonsays1980
restore_from_path
to `ConnectorPipelineV2' to build directly from checkpoint.ConnectorPipelineV2
restoring from checkpoint (by writing information about individual connector pieces to the ctor_args_and_kwargs
file).
edoakes
pushed a commit
to edoakes/ray
that referenced
this pull request
Oct 30, 2024
…ng information about individual connector pieces to the `ctor_args_and_kwargs` file). (ray-project#48213)
Jay-ju
pushed a commit
to Jay-ju/ray
that referenced
this pull request
Nov 5, 2024
…ng information about individual connector pieces to the `ctor_args_and_kwargs` file). (ray-project#48213)
JP-sDEV
pushed a commit
to JP-sDEV/ray
that referenced
this pull request
Nov 14, 2024
…ng information about individual connector pieces to the `ctor_args_and_kwargs` file). (ray-project#48213) Signed-off-by: JP-sDEV <jon.pablo80@gmail.com>
mohitjain2504
pushed a commit
to mohitjain2504/ray
that referenced
this pull request
Nov 15, 2024
…ng information about individual connector pieces to the `ctor_args_and_kwargs` file). (ray-project#48213) Signed-off-by: mohitjain2504 <mohit.jain@dream11.com>
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.
Why are these changes needed?
At the moment a
ConnectorPipelineV2
needs to be build first to load its state from a checkpoint. This is due to the fact that for a state to be restored connectors that should be loaded from the state need to be instantiated first in the pipeline.This PR proposes a
get_ctor_args_and_kwargs
override in theConnectorPipelineV2
that stores for each connector in the pipeline a 3-tuples, namely class, args, and kwargs. When building the pipeline from checkpoint the connector tuples are passed into the class constructor and all connectors are build before their state is loaded.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.