-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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] Make most RLlib components implementers of the new Checkpointable
API for unified checkpointing experience.
#46435
Merged
sven1977
merged 61 commits into
ray-project:master
from
sven1977:issue_46247_add_module_not_using_module_state_arg
Jul 13, 2024
Merged
[RLlib] Make most RLlib components implementers of the new Checkpointable
API for unified checkpointing experience.
#46435
sven1977
merged 61 commits into
ray-project:master
from
sven1977:issue_46247_add_module_not_using_module_state_arg
Jul 13, 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
Signed-off-by: sven1977 <[email protected]>
…e_46247_add_module_not_using_module_state_arg
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
…ng_module_state_arg # Conflicts: # rllib/utils/checkpoints.py
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
…e_46247_add_module_not_using_module_state_arg Signed-off-by: sven1977 <[email protected]> # Conflicts: # rllib/algorithms/algorithm.py # rllib/core/learner/learner.py # rllib/core/learner/learner_group.py # rllib/core/rl_module/marl_module.py # rllib/core/rl_module/rl_module.py # rllib/core/rl_module/tf/tf_rl_module.py # rllib/core/rl_module/torch/torch_rl_module.py # rllib/env/env_runner.py # rllib/env/single_agent_env_runner.py # rllib/utils/checkpoints.py
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
…e_46247_add_module_not_using_module_state_arg
sven1977
requested review from
ArturNiederfahrenhorst and
simonsays1980
as code owners
July 4, 2024 09:55
Signed-off-by: sven1977 <[email protected]>
…e_46247_add_module_not_using_module_state_arg
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
…e_46247_add_module_not_using_module_state_arg
Signed-off-by: sven1977 <[email protected]>
…e_46247_add_module_not_using_module_state_arg
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
…e_46247_add_module_not_using_module_state_arg
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Catch-Bull
pushed a commit
to Catch-Bull/ray
that referenced
this pull request
Jul 15, 2024
…table` API for unified checkpointing experience. (ray-project#46435) Signed-off-by: hejialing.hjl <[email protected]>
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.
Make most RLlib components implementers of the new
Checkpointable
API for unified checkpointing experience.In particular, these components are:
Learner, LearnerGroup, RLModule (and MARLModule), EnvRunners (single- and multi-agent), ConnectorV2 (and pipelines).
This now allows for maximum flexibility when creating checkpoints of Algorithms and any possible subsets of component(s) of this Algorithm. Each component can define its own subcomponents, each of which will create its own subdirectory in the component's checkpoint dir.
For example, when doing ...
... the resulting directory tree in [dir] will be:
Where
metadata.json
contains convenience user-readable meta information of the (sub)component saved. This information is NOT part of the state and not required to restore the respective component from disk.state.pkl
contains all state information that is NOT part of any subcomponent (which has its ownstate.pkl
file). For example, the optimizer state of a Learner.class_and_ctor_args.pkl
stores the class of the (sub)component and its required args and kwargs to create an initial instance. This file is only needed when using theCheckpointable.from_checkpoint([dir])
method to create a new instance (and restore its state from the checkpoint).Why are these changes needed?
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.