-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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] Remove all default config objects and rllib/agents #33242
[RLlib] Remove all default config objects and rllib/agents #33242
Conversation
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
…missing configs Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
>>> ppo = ppo_config.build(env="Pendulum-v1") | ||
>>> from ray.rllib.algorithms.ppo.ppo import PPOConfig # doctest: +SKIP | ||
>>> ppo_config = PPOConfig.from_dict({...}) # doctest: +SKIP | ||
>>> ppo = ppo_config.build(env="Pendulum-v1") # doctest: +SKIP |
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.
I left this method here for now, since some folks might be actively using it still.
We can create deprecation warnings here if you will.
|
||
policy = Policy.from_checkpoint(path_to_checkpoint) | ||
self.assertTrue(isinstance(policy, Policy)) | ||
|
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.
We can not support this anymore. Upholding this would require converting old config dicts inside of these 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.
Understood.
@@ -117,7 +117,7 @@ def test_nested_action_spaces(self): | |||
ioctx.config["input_config"]["paths"], ioctx | |||
) | |||
config["input_config"] = {"paths": config["output"]} | |||
del config["output"] | |||
del config.output |
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.
Nit: I don't think we should del
this here, since it's now a property. Just set it to None
?
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! Just one nit in my comments on del'ing a property.
Signed-off-by: Artur Niederfahrenhorst <[email protected]>
…ct#33242) Signed-off-by: Artur Niederfahrenhorst <[email protected]> Signed-off-by: Jack He <[email protected]>
…ct#33242) Signed-off-by: Artur Niederfahrenhorst <[email protected]> Signed-off-by: Edward Oakes <[email protected]>
…ct#33242) Signed-off-by: Artur Niederfahrenhorst <[email protected]>
…ct#33242) Signed-off-by: Artur Niederfahrenhorst <[email protected]> Signed-off-by: chaowang <[email protected]>
…ct#33242) Signed-off-by: Artur Niederfahrenhorst <[email protected]> Signed-off-by: elliottower <[email protected]>
…ct#33242) Signed-off-by: Artur Niederfahrenhorst <[email protected]> Signed-off-by: Jack He <[email protected]>
Why are these changes needed?
With Ray 2.0.0, we had made two migrations:
Trainer -> Algorithm
ConfigDicts -> AlgorithmConfig objects
This was over 8 months ago and appears to be a sufficient amount of time to fully deprecate the aliases for Trainers from the rllib/agent directory and the legacy config dicts _DEFAULT_CONFIG.
This is also necessary so that less config dicts trickle into RLlib to reduce errors that stem from us attemping to access these object's variables, while they still need to be indexed.
This PR is needed so that we can move forward with #29205