-
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] New API stack: (Multi)RLModule overhaul vol 01 (some preparatory cleanups). #47884
[RLlib] New API stack: (Multi)RLModule overhaul vol 01 (some preparatory cleanups). #47884
Conversation
Signed-off-by: sven1977 <[email protected]>
@@ -685,7 +685,6 @@ def setup(self, config: AlgorithmConfig) -> None: | |||
) | |||
and self.config.input_ != "sampler" | |||
and self.config.enable_rl_module_and_learner | |||
and self.config.enable_env_runner_and_connector_v2 |
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.
note: we don 't need these double checks anymore b/c the hybrid stack has been deprecated already (users will get error message in the config.validate()
call).
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.
Yes, let's remove it!
with self.metrics.log_time((TIMERS, ENV_RUNNER_SAMPLING_TIMER)): | ||
if self.config.count_steps_by == "agent_steps": | ||
train_batch, env_runner_results = synchronous_parallel_sample( | ||
episodes, env_runner_results = synchronous_parallel_sample( |
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.
this was a bug
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. At some locations I have questions if some removed code is still needed by the old stack.
@@ -685,7 +685,6 @@ def setup(self, config: AlgorithmConfig) -> None: | |||
) | |||
and self.config.input_ != "sampler" | |||
and self.config.enable_rl_module_and_learner | |||
and self.config.enable_env_runner_and_connector_v2 |
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.
Yes, let's remove it!
# this information only needs to be kept in the Learner and not on the | ||
# EnvRunners anymore. | ||
if not self.config.enable_env_runner_and_connector_v2: | ||
policies_to_train = self.config.policies_to_train or set( |
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.
Don't we need this still in the old stack?
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.
The code will never get there anymore because users on the new API stack will call add_module
and remove_module
(instead of add_policy
and remove_policy
). But you are right, we should error out here directly if the config says otherwise. I'll add these exceptions ...
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.
Ah, these errors are already there.
Signed-off-by: sven1977 <[email protected]>
…odule_do_over_bc_default_module_01_preparation
Signed-off-by: sven1977 <[email protected]>
…odule_do_over_bc_default_module_01_preparation
…ory cleanups). (ray-project#47884) Signed-off-by: ujjawal-khare <[email protected]>
…ory cleanups). (ray-project#47884) Signed-off-by: ujjawal-khare <[email protected]>
…ory cleanups). (ray-project#47884) Signed-off-by: ujjawal-khare <[email protected]>
…ory cleanups). (ray-project#47884) Signed-off-by: ujjawal-khare <[email protected]>
…ory cleanups). (ray-project#47884) Signed-off-by: ujjawal-khare <[email protected]>
…ory cleanups). (ray-project#47884) Signed-off-by: ujjawal-khare <[email protected]>
…ory cleanups). (ray-project#47884) Signed-off-by: ujjawal-khare <[email protected]>
…ory cleanups). (ray-project#47884) Signed-off-by: ujjawal-khare <[email protected]>
…ory cleanups). (ray-project#47884) Signed-off-by: ujjawal-khare <[email protected]>
New API stack: (Multi)RLModule overhaul vol 01 (some preparatory cleanups).
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.