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] Renaming all ConnectorV2 example scripts (removed the prefix "connector_v2_" as it is superfluous). #44841

Merged
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
2 changes: 1 addition & 1 deletion doc/source/rllib/rllib-examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Multi-Agent and Hierarchical
Special Action- and Observation Spaces
--------------------------------------

- `Nested action spaces <https://github.com/ray-project/ray/blob/master/rllib/examples/connectors/connector_v2_nested_action_spaces.py>`__:
- `Nested action spaces <https://github.com/ray-project/ray/blob/master/rllib/examples/connectors/nested_action_spaces.py>`__:
Learning in arbitrarily nested action spaces.
- `Parametric actions <https://github.com/ray-project/ray/blob/master/rllib/examples/_old_api_stack/parametric_actions_cartpole.py>`__:
Example of how to handle variable-length or parametric action spaces.
Expand Down
60 changes: 30 additions & 30 deletions rllib/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2155,96 +2155,96 @@ py_test(
# ....................................
# Framestacking examples only run in smoke-test mode (a few iters only).
py_test(
name = "examples/connectors/connector_v2_frame_stacking_ppo",
main = "examples/connectors/connector_v2_frame_stacking.py",
name = "examples/connectors/frame_stacking_ppo",
main = "examples/connectors/frame_stacking.py",
tags = ["team:rllib", "exclusive", "examples"],
size = "medium",
srcs = ["examples/connectors/connector_v2_frame_stacking.py"],
srcs = ["examples/connectors/frame_stacking.py"],
args = ["--enable-new-api-stack", "--stop-iter=2", "--framework=torch", "--algo=PPO"]
)

py_test(
name = "examples/connectors/connector_v2_frame_stacking_multi_agent_ppo",
main = "examples/connectors/connector_v2_frame_stacking.py",
name = "examples/connectors/frame_stacking_multi_agent_ppo",
main = "examples/connectors/frame_stacking.py",
tags = ["team:rllib", "exclusive", "examples"],
size = "medium",
srcs = ["examples/connectors/connector_v2_frame_stacking.py"],
srcs = ["examples/connectors/frame_stacking.py"],
args = ["--enable-new-api-stack", "--num-agents=2", "--stop-iter=2", "--framework=torch", "--algo=PPO", "--num-env-runners=4", "--num-cpus=6"]
)

# Nested action spaces (flattening obs and learning w/ multi-action distribution).
py_test(
name = "examples/connectors/connector_v2_nested_action_spaces_ppo",
main = "examples/connectors/connector_v2_nested_action_spaces.py",
name = "examples/connectors/nested_action_spaces_ppo",
main = "examples/connectors/nested_action_spaces.py",
tags = ["team:rllib", "exclusive", "examples"],
size = "large",
srcs = ["examples/connectors/connector_v2_nested_action_spaces.py"],
srcs = ["examples/connectors/nested_action_spaces.py"],
args = ["--enable-new-api-stack", "--as-test", "--framework=torch", "--stop-reward=-500.0", "--algo=PPO"]
)

py_test(
name = "examples/connectors/connector_v2_nested_action_spaces_multi_agent_ppo",
main = "examples/connectors/connector_v2_nested_action_spaces.py",
name = "examples/connectors/nested_action_spaces_multi_agent_ppo",
main = "examples/connectors/nested_action_spaces.py",
tags = ["team:rllib", "exclusive", "examples"],
size = "large",
srcs = ["examples/connectors/connector_v2_nested_action_spaces.py"],
srcs = ["examples/connectors/nested_action_spaces.py"],
args = ["--enable-new-api-stack", "--as-test", "--num-agents=2", "--framework=torch", "--stop-reward=-1000.0", "--algo=PPO"]
)

# Nested observation spaces (flattening).
py_test(
name = "examples/connectors/connector_v2_nested_observation_spaces_ppo",
main = "examples/connectors/connector_v2_nested_observation_spaces.py",
name = "examples/connectors/nested_observation_spaces_ppo",
main = "examples/connectors/nested_observation_spaces.py",
tags = ["team:rllib", "exclusive", "examples"],
size = "medium",
srcs = ["examples/connectors/connector_v2_nested_observation_spaces.py"],
srcs = ["examples/connectors/nested_observation_spaces.py"],
args = ["--enable-new-api-stack", "--as-test", "--stop-reward=400.0", "--framework=torch", "--algo=PPO"]
)

py_test(
name = "examples/connectors/connector_v2_nested_observation_spaces_multi_agent_ppo",
main = "examples/connectors/connector_v2_nested_observation_spaces.py",
name = "examples/connectors/nested_observation_spaces_multi_agent_ppo",
main = "examples/connectors/nested_observation_spaces.py",
tags = ["team:rllib", "exclusive", "examples"],
size = "medium",
srcs = ["examples/connectors/connector_v2_nested_observation_spaces.py"],
srcs = ["examples/connectors/nested_observation_spaces.py"],
args = ["--enable-new-api-stack", "--num-agents=2", "--as-test", "--stop-reward=800.0", "--framework=torch", "--algo=PPO"]
)

# Prev-r/prev actions + LSTM example.
py_test(
name = "examples/connectors/connector_v2_prev_actions_prev_rewards_ppo",
main = "examples/connectors/connector_v2_prev_actions_prev_rewards.py",
name = "examples/connectors/prev_actions_prev_rewards_ppo",
main = "examples/connectors/prev_actions_prev_rewards.py",
tags = ["team:rllib", "exclusive", "examples"],
size = "large",
srcs = ["examples/connectors/connector_v2_prev_actions_prev_rewards.py"],
srcs = ["examples/connectors/prev_actions_prev_rewards.py"],
args = ["--enable-new-api-stack", "--as-test", "--stop-reward=200.0", "--framework=torch", "--algo=PPO", "--num-env-runners=4", "--num-cpus=6"]
)

py_test(
name = "examples/connectors/connector_v2_prev_actions_prev_rewards_multi_agent_ppo",
main = "examples/connectors/connector_v2_prev_actions_prev_rewards.py",
name = "examples/connectors/prev_actions_prev_rewards_multi_agent_ppo",
main = "examples/connectors/prev_actions_prev_rewards.py",
tags = ["team:rllib", "exclusive", "examples"],
size = "large",
srcs = ["examples/connectors/connector_v2_prev_actions_prev_rewards.py"],
srcs = ["examples/connectors/prev_actions_prev_rewards.py"],
args = ["--enable-new-api-stack", "--num-agents=2", "--as-test", "--stop-reward=400.0", "--framework=torch", "--algo=PPO", "--num-env-runners=4", "--num-cpus=6"]
)

# MeanStd filtering example.
py_test(
name = "examples/connectors/connector_v2_mean_std_filtering_ppo",
main = "examples/connectors/connector_v2_mean_std_filtering.py",
name = "examples/connectors/mean_std_filtering_ppo",
main = "examples/connectors/mean_std_filtering.py",
tags = ["team:rllib", "exclusive", "examples"],
size = "medium",
srcs = ["examples/connectors/connector_v2_mean_std_filtering.py"],
srcs = ["examples/connectors/mean_std_filtering.py"],
args = ["--enable-new-api-stack", "--as-test", "--stop-reward=-300.0", "--framework=torch", "--algo=PPO", "--num-env-runners=2"]
)

py_test(
name = "examples/connectors/connector_v2_mean_std_filtering_multi_agent_ppo",
main = "examples/connectors/connector_v2_mean_std_filtering.py",
name = "examples/connectors/mean_std_filtering_multi_agent_ppo",
main = "examples/connectors/mean_std_filtering.py",
tags = ["team:rllib", "exclusive", "examples"],
size = "medium",
srcs = ["examples/connectors/connector_v2_mean_std_filtering.py"],
srcs = ["examples/connectors/mean_std_filtering.py"],
args = ["--enable-new-api-stack", "--num-agents=2", "--as-test", "--stop-reward=-600.0", "--framework=torch", "--algo=PPO", "--num-env-runners=5", "--num-cpus=6"]
)

Expand Down
2 changes: 1 addition & 1 deletion rllib/examples/nested_action_spaces.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
msg = """
This script has been moved to
`ray.rllib.examples.connectors.connector_v2_nested_action_spaces.py`
`ray.rllib.examples.connectors.nested_action_spaces.py`
"""

raise NotImplementedError(msg)
2 changes: 1 addition & 1 deletion rllib/examples/rl_modules/frame_stacking_rlm.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
ConnectorV2). Take a look at this example script here, which shows how you can do frame-
stacking with RLlib's new ConnectorV2 API.

`ray.rllib.examples.connectors.connector_v2_frame_stacking.py`
`ray.rllib.examples.connectors.frame_stacking.py`
"""

raise NotImplementedError(msg)
Loading