Skip to content
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] Cleanup examples folder (vol 30): BC pretraining, then PPO finetuning (new API stack with RLModule checkpoints). #47838

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 19 additions & 15 deletions rllib/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ py_test(
tags = ["team:rllib", "exclusive", "learning_tests", "torch_only", "learning_tests_discrete", "learning_tests_pytorch_use_all_core"],
size = "medium",
srcs = ["tuned_examples/bc/cartpole_bc.py"],
# Include the zipped json data file as well.
# Include the offline data files.
data = [
"tests/data/cartpole/cartpole-v1_large",
],
Expand Down Expand Up @@ -557,7 +557,7 @@ py_test(
tags = ["team:rllib", "exclusive", "learning_tests", "torch_only", "learning_tests_discrete", "learning_tests_pytorch_use_all_core"],
size = "large",
srcs = ["tuned_examples/marwil/cartpole_marwil.py"],
# Include the zipped json data file as well.
# Include the offline data files.
data = [
"tests/data/cartpole/cartpole-v1_large",
],
Expand Down Expand Up @@ -987,7 +987,7 @@ py_test(
name = "test_bc",
tags = ["team:rllib", "algorithms_dir"],
size = "medium",
# Include the parquet data files.
# Include the offline data files.
data = ["tests/data/cartpole/cartpole-v1_large"],
srcs = ["algorithms/bc/tests/test_bc.py"]
)
Expand Down Expand Up @@ -1052,7 +1052,7 @@ py_test(
name = "test_marwil",
tags = ["team:rllib", "algorithms_dir"],
size = "large",
# Include the parquet data folder.
# Include the offline data files.
data = [
"tests/data/cartpole/cartpole-v1_large",
"tests/data/pendulum/pendulum-v1_large",
Expand Down Expand Up @@ -1708,21 +1708,23 @@ py_test(
tags = ["team:rllib", "offline"],
size = "medium",
srcs = ["offline/tests/test_offline_data.py"],
# Include the offline data files.
data = [
"tests/data/cartpole/cartpole-v1_large",
"tests/data/cartpole/large.json",
],
]
)

py_test(
name = "test_offline_prelearner",
tags = ["team:rllib", "offline"],
size = "small",
srcs = ["offline/tests/test_offline_prelearner.py"],
# Include the offline data files.
data = [
"tests/data/cartpole/cartpole-v1_large",
"tests/data/cartpole/large.json",
],
]
)

# --------------------------------------------------------------------
Expand Down Expand Up @@ -2950,15 +2952,6 @@ py_test(
args = ["--framework=tf2", "--config=multi-gpu-ddp"]
)

#@OldAPIStack @HybridAPIStack
py_test(
name = "examples/learners/train_w_bc_finetune_w_ppo",
main = "examples/learners/train_w_bc_finetune_w_ppo.py",
tags = ["team:rllib", "examples", "exclusive"],
size = "medium",
srcs = ["examples/learners/train_w_bc_finetune_w_ppo.py"],
)

# subdirectory: multi_agent/
# ....................................
py_test(
Expand Down Expand Up @@ -3111,6 +3104,17 @@ py_test(
# subdirectory: offline_rl/
# ....................................

py_test(
name = "examples/offline_rl/train_w_bc_finetune_w_ppo",
main = "examples/offline_rl/train_w_bc_finetune_w_ppo.py",
tags = ["team:rllib", "examples", "exclusive"],
size = "medium",
srcs = ["examples/offline_rl/train_w_bc_finetune_w_ppo.py"],
args = ["--enable-new-api-stack", "--as-test", "--framework=torch"],
# Include the offline data files.
data = ["tests/data/cartpole/cartpole-v1_large"]
)

# @HybridAPIStack
# py_test(
# name = "examples/offline_rl/pretrain_bc_single_agent_evaluate_as_multi_agent",
Expand Down
1 change: 1 addition & 0 deletions rllib/algorithms/algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,7 @@ def setup(self, config: AlgorithmConfig) -> None:
env_steps_sampled=self.metrics.peek(
NUM_ENV_STEPS_SAMPLED_LIFETIME, default=0
),
rl_module_state=rl_module_state,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a bug!

)

if self.offline_data:
Expand Down
182 changes: 0 additions & 182 deletions rllib/examples/learners/train_w_bc_finetune_w_ppo.py

This file was deleted.

Loading
Loading