-
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] Discontinue support for "hybrid" API stack (using RLModule + Learner, but still on RolloutWorker and Policy) #46085
[RLlib] Discontinue support for "hybrid" API stack (using RLModule + Learner, but still on RolloutWorker and Policy) #46085
Conversation
Signed-off-by: sven1977 <[email protected]>
…ecate_hybrid_api_stack Signed-off-by: sven1977 <[email protected]> # Conflicts: # rllib/BUILD # rllib/algorithms/impala/tests/test_impala_learner.py # rllib/algorithms/impala/tests/test_impala_off_policyness.py # rllib/algorithms/ppo/tests/test_ppo_with_env_runner.py # rllib/tuned_examples/impala/cartpole-impala.yaml
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
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. Please check, if we can remove in the same breath the view_requirement
from core.models.Catalog
and the view_requirements
-related methods from RLModule
. In addition: Can't we with this change also deprecate TensorFlow in the new stack?
# Disabled hybrid API stack. Now, both `enable_rl_module_and_learner` and | ||
# `enable_env_runner_and_connector_v2` must be True or both False. | ||
if not self.enable_env_runner_and_connector_v2: | ||
raise ValueError( |
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 smell a new world rising .... :)
rllib/algorithms/bc/tests/test_bc.py
Outdated
@@ -51,7 +51,7 @@ def test_bc_compilation_and_learning_from_offline_file(self): | |||
min_return_to_reach = 75.0 | |||
|
|||
# Test for RLModule API and ModelV2. | |||
for rl_modules in [True, False]: |
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.
Yessss
for key, view_req in self.view_requirements.items(): | ||
if key not in self._dummy_batch.accessed_keys: | ||
view_req.used_for_compute_actions = False | ||
for key, view_req in self.view_requirements.items(): |
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 should be able to remove now also the view_requirements
from the Catalog
, shouldn't we? In addition remove all the view_requirement
methods in the RLModule
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.
done
…ecate_hybrid_api_stack
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
…ecate_hybrid_api_stack Signed-off-by: sven1977 <[email protected]> # Conflicts: # rllib/algorithms/algorithm.py # rllib/algorithms/bc/tests/test_bc.py # rllib/algorithms/ppo/ppo.py # rllib/algorithms/ppo/tests/test_ppo.py # rllib/algorithms/ppo/tests/test_ppo_with_env_runner.py # rllib/algorithms/tests/test_algorithm_config.py # rllib/core/testing/tests/test_bc_algorithm.py # rllib/evaluation/postprocessing.py # rllib/evaluation/rollout_worker.py # rllib/evaluation/tests/test_trajectory_view_api.py # rllib/models/tests/test_preprocessors.py # rllib/policy/eager_tf_policy_v2.py # rllib/policy/policy.py # rllib/policy/tests/test_compute_log_likelihoods.py # rllib/policy/tests/test_policy.py # rllib/tests/test_algorithm_rl_module_restore.py # rllib/utils/exploration/tests/test_explorations.py
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
…ecate_hybrid_api_stack Signed-off-by: sven1977 <[email protected]> # Conflicts: # rllib/algorithms/ppo/ppo.py # rllib/algorithms/ppo/tests/test_ppo.py # rllib/algorithms/ppo/tests/test_ppo_with_env_runner.py # rllib/core/learner/learner_group.py # rllib/examples/multi_agent/self_play_league_based_with_open_spiel.py # rllib/examples/rl_modules/classes/mobilenet_rlm.py # rllib/models/tests/test_preprocessors.py
Signed-off-by: sven1977 <[email protected]>
…ch_on_new_api_stack_by_default_for_sac_and_dqn Signed-off-by: sven1977 <[email protected]> # Conflicts: # rllib/algorithms/dqn/tests/test_dqn.py # rllib/algorithms/ppo/tests/test_repro_ppo.py # rllib/algorithms/sac/sac.py # rllib/algorithms/sac/tests/test_rnnsac.py # rllib/algorithms/sac/tests/test_sac.py
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]>
…ch_on_new_api_stack_by_default_for_sac_and_dqn
Signed-off-by: sven1977 <[email protected]>
Signed-off-by: sven1977 <[email protected]>
…ecate_hybrid_api_stack Signed-off-by: sven1977 <[email protected]> # Conflicts: # doc/source/rllib/doc_code/training.py # rllib/algorithms/cql/cql.py # rllib/algorithms/dqn/dqn.py # rllib/algorithms/ppo/tests/test_ppo.py # rllib/algorithms/ppo/tests/test_ppo_old_api_stack.py # rllib/algorithms/sac/sac.py
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]>
…Learner, but still on RolloutWorker and Policy) (ray-project#46085) Signed-off-by: ujjawal-khare <[email protected]>
…Learner, but still on RolloutWorker and Policy) (ray-project#46085) Signed-off-by: ujjawal-khare <[email protected]>
…Learner, but still on RolloutWorker and Policy) (ray-project#46085) Signed-off-by: ujjawal-khare <[email protected]>
…Learner, but still on RolloutWorker and Policy) (ray-project#46085) Signed-off-by: ujjawal-khare <[email protected]>
…Learner, but still on RolloutWorker and Policy) (ray-project#46085) Signed-off-by: ujjawal-khare <[email protected]>
…Learner, but still on RolloutWorker and Policy) (ray-project#46085) Signed-off-by: ujjawal-khare <[email protected]>
…Learner, but still on RolloutWorker and Policy) (ray-project#46085) Signed-off-by: ujjawal-khare <[email protected]>
…Learner, but still on RolloutWorker and Policy) (ray-project#46085) Signed-off-by: ujjawal-khare <[email protected]>
…Learner, but still on RolloutWorker and Policy) (ray-project#46085) Signed-off-by: ujjawal-khare <[email protected]>
Discontinue support for "hybrid" API stack (using RLModule + Learner, but still on RolloutWorker and Policy)
enable_rl_module_and_learner=True
ANDenable_env_runner_and_connector_v2=False
is no longer allowed and will create an error.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.