Skip to content

Commit

Permalink
[RLlib; docs] Docs do-over (new API stack): Env pages vol 01. (ray-pr…
Browse files Browse the repository at this point in the history
  • Loading branch information
sven1977 authored and simonsays1980 committed Dec 12, 2024
1 parent bcb667c commit e8d3749
Show file tree
Hide file tree
Showing 33 changed files with 636 additions and 1,379 deletions.
1 change: 1 addition & 0 deletions doc/source/rllib/images/envs/env_runners.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions doc/source/rllib/images/envs/external_env_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions doc/source/rllib/images/envs/hierarchical_env_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions doc/source/rllib/images/envs/multi_agent_env_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions doc/source/rllib/images/envs/multi_agent_setup.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions doc/source/rllib/images/envs/single_agent_env_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions doc/source/rllib/images/envs/single_agent_setup.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions doc/source/rllib/single-agent-episode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,14 @@ episodes (one non-finalized the other finalized):
:align: left

**Complex observations in a non-finalized episode**: Each individual observation is a (complex) dict matching the
gym environment's observation space. There are three such observation items stored in the episode so far.
gymnasium environment's observation space. There are three such observation items stored in the episode so far.

.. figure:: images/episodes/sa_episode_finalized.svg
:width: 600
:align: left

**Complex observations in a finalized episode**: The entire observation record is a single (complex) dict matching the
gym environment's observation space. At the leafs of the structure are `NDArrays` holding the individual values of the leaf.
gymnasium environment's observation space. At the leafs of the structure are `NDArrays` holding the individual values of the leaf.
Note that these `NDArrays` have an extra batch dim (axis=0), whose length matches the length of the episode stored (here 3).


Expand Down
22 changes: 16 additions & 6 deletions rllib/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2362,6 +2362,22 @@ py_test(

# subdirectory: envs/
# ....................................
py_test(
name = "examples/envs/agents_act_simultaneously",
main = "examples/envs/agents_act_simultaneously.py",
tags = ["team:rllib", "exclusive", "examples"],
size = "medium",
srcs = ["examples/envs/agents_act_simultaneously.py"],
args = ["--enable-new-api-stack", "--num-agents=2", "--stop-iters=3"]
)
py_test(
name = "examples/envs/agents_act_in_sequence",
main = "examples/envs/agents_act_in_sequence.py",
tags = ["team:rllib", "exclusive", "examples"],
size = "medium",
srcs = ["examples/envs/agents_act_in_sequence.py"],
args = ["--enable-new-api-stack", "--num-agents=2", "--stop-iters=3"]
)
py_test(
name = "examples/envs/custom_env_render_method",
main = "examples/envs/custom_env_render_method.py",
Expand All @@ -2370,7 +2386,6 @@ py_test(
srcs = ["examples/envs/custom_env_render_method.py"],
args = ["--enable-new-api-stack", "--num-agents=0"]
)

py_test(
name = "examples/envs/custom_env_render_method_multi_agent",
main = "examples/envs/custom_env_render_method.py",
Expand All @@ -2379,7 +2394,6 @@ py_test(
srcs = ["examples/envs/custom_env_render_method.py"],
args = ["--enable-new-api-stack", "--num-agents=2"]
)

py_test(
name = "examples/envs/custom_gym_env",
main = "examples/envs/custom_gym_env.py",
Expand All @@ -2388,7 +2402,6 @@ py_test(
srcs = ["examples/envs/custom_gym_env.py"],
args = ["--enable-new-api-stack", "--as-test"]
)

py_test(
name = "examples/envs/env_connecting_to_rllib_w_tcp_client",
main = "examples/envs/env_connecting_to_rllib_w_tcp_client.py",
Expand All @@ -2397,15 +2410,13 @@ py_test(
srcs = ["examples/envs/env_connecting_to_rllib_w_tcp_client.py"],
args = ["--enable-new-api-stack", "--as-test", "--port=12346"]
)

py_test(
name = "examples/envs/env_rendering_and_recording",
srcs = ["examples/envs/env_rendering_and_recording.py"],
tags = ["team:rllib", "exclusive", "examples"],
size = "medium",
args = ["--enable-new-api-stack", "--env=CartPole-v1", "--stop-iters=2"]
)

py_test(
name = "examples/envs/env_w_protobuf_observations",
main = "examples/envs/env_w_protobuf_observations.py",
Expand All @@ -2414,7 +2425,6 @@ py_test(
srcs = ["examples/envs/env_w_protobuf_observations.py"],
args = ["--enable-new-api-stack", "--as-test"]
)

#@OldAPIStack
py_test(
name = "examples/envs/greyscale_env",
Expand Down
Loading

0 comments on commit e8d3749

Please sign in to comment.