Skip to content

Commit

Permalink
[CI; RLlib] Increase parallel example scripts processes from 5 to 6. (r…
Browse files Browse the repository at this point in the history
  • Loading branch information
sven1977 authored and simonsays1980 committed Dec 12, 2024
1 parent a9ebf71 commit a90aa29
Show file tree
Hide file tree
Showing 22 changed files with 1 addition and 2,227 deletions.
2 changes: 1 addition & 1 deletion .buildkite/rllib.rayci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ steps:

- label: ":brain: rllib: examples"
tags: rllib
parallelism: 5
parallelism: 6
instance_type: large
commands:
- bazel run //ci/ray_ci:test_in_docker -- //rllib/... rllib
Expand Down
50 changes: 0 additions & 50 deletions .buildkite/rllib_contrib.rayci.yml

This file was deleted.

23 changes: 0 additions & 23 deletions doc/source/rllib/rllib-models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -390,29 +390,6 @@ Take a look at this model example that does exactly that:
:end-before: __sphinx_doc_end__


**Using the Trajectory View API: Passing in the last n actions (or rewards or observations) as inputs to a custom Model**

It is sometimes helpful for learning not only to look at the current observation
in order to calculate the next action, but also at the past n observations.
In other cases, you may want to provide the most recent rewards or actions to the model as well
(like our LSTM wrapper does if you specify: ``use_lstm=True`` and ``lstm_use_prev_action/reward=True``).
All this may even be useful when not working with partially observable environments (PO-MDPs)
and/or RNN/Attention models, as for example in classic Atari runs, where we usually use framestacking of
the last four observed images.

The trajectory view API allows your models to specify these more complex "view requirements".

Here is a simple (non-RNN/Attention) example of a Model that takes as input
the last 3 observations (very similar to the recommended "framestacking" for
learning in Atari environments):

.. literalinclude:: ../../../rllib/examples/_old_api_stack/models/trajectory_view_utilizing_models.py
:language: python
:start-after: __sphinx_doc_begin__
:end-before: __sphinx_doc_end__

A PyTorch version of the above model is also `given in the same file <https://github.com/ray-project/ray/blob/master/rllib/examples/_old_api_stack/models/trajectory_view_utilizing_models.py>`__.


Custom Action Distributions
---------------------------
Expand Down
85 changes: 0 additions & 85 deletions rllib/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -1455,13 +1455,6 @@ py_test(
srcs = ["models/tests/test_lstms.py"]
)

py_test(
name = "test_models",
tags = ["team:rllib", "models"],
size = "medium",
srcs = ["models/tests/test_models.py"]
)

py_test(
name = "test_preprocessors",
tags = ["team:rllib", "models"],
Expand Down Expand Up @@ -1978,34 +1971,6 @@ py_test(
# ----------------------
# Old API stack examples
# ----------------------
# subdirectory: _old_api_stack/
py_test(
name = "examples/_old_api_stack/complex_struct_space_tf",
main = "examples/_old_api_stack/complex_struct_space.py",
tags = ["team:rllib", "exclusive", "examples", "old_api_stack"],
size = "small",
srcs = ["examples/_old_api_stack/complex_struct_space.py"],
args = ["--framework=tf"],
)

py_test(
name = "examples/_old_api_stack/complex_struct_space_tf_eager",
main = "examples/_old_api_stack/complex_struct_space.py",
tags = ["team:rllib", "exclusive", "examples", "old_api_stack"],
size = "small",
srcs = ["examples/_old_api_stack/complex_struct_space.py"],
args = ["--framework=tf2"],
)

py_test(
name = "examples/_old_api_stack/complex_struct_space_torch",
main = "examples/_old_api_stack/complex_struct_space.py",
tags = ["team:rllib", "exclusive", "examples", "old_api_stack"],
size = "small",
srcs = ["examples/_old_api_stack/complex_struct_space.py"],
args = ["--framework=torch"],
)

# subdirectory: _old_api_stack/connectors/
py_test(
name = "examples/_old_api_stack/connectors/run_connector_policy",
Expand All @@ -2024,25 +1989,6 @@ py_test(
args = ["--use-lstm"],
)

py_test(
name = "examples/_old_api_stack/connectors/adapt_connector_policy",
main = "examples/_old_api_stack/connectors/adapt_connector_policy.py",
tags = ["team:rllib", "exclusive", "examples", "old_api_stack"],
size = "small",
srcs = ["examples/_old_api_stack/connectors/adapt_connector_policy.py"],
)

# py_test(
# name = "examples/_old_api_stack/connectors/self_play_with_policy_checkpoint",
# main = "examples/_old_api_stack/connectors/self_play_with_policy_checkpoint.py",
# tags = ["team:rllib", "exclusive", "examples", "old_api_stack"],
# size = "small",
# srcs = ["examples/_old_api_stack/connectors/self_play_with_policy_checkpoint.py"],
# args = [
# "--train_iteration=1" # Smoke test.
# ]
# )

# ----------------------
# New API stack
# Note: This includes to-be-translated-to-new-API-stack examples
Expand Down Expand Up @@ -2631,26 +2577,6 @@ py_test(
args = ["--enable-new-api-stack", "--stop-reward=150.0"]
)

#@OldAPIStack
py_test(
name = "examples/inference/policy_inference_after_training_with_attention_tf",
main = "examples/inference/policy_inference_after_training_with_attention.py",
tags = ["team:rllib", "exclusive", "examples"],
size = "medium",
srcs = ["examples/inference/policy_inference_after_training_with_attention.py"],
args = ["--stop-iters=2", "--framework=tf"]
)

#@OldAPIStack
py_test(
name = "examples/inference/policy_inference_after_training_with_attention_torch",
main = "examples/inference/policy_inference_after_training_with_attention.py",
tags = ["team:rllib", "exclusive", "examples"],
size = "medium",
srcs = ["examples/inference/policy_inference_after_training_with_attention.py"],
args = ["--stop-iters=2", "--framework=torch"]
)

#@OldAPIStack
py_test(
name = "examples/inference/policy_inference_after_training_with_lstm_tf",
Expand Down Expand Up @@ -2897,17 +2823,6 @@ py_test(
# args = ["--as-test"]
# )

#@OldAPIStack
# TODO (sven): Doesn't seem to learn at the moment. Uncomment once fixed.
# py_test(
# name = "examples/offline_rl/custom_input_api_cql_torch",
# main = "examples/offline_rl/custom_input_api.py",
# tags = ["team:rllib", "exclusive", "examples"],
# size = "medium",
# srcs = ["examples/offline_rl/custom_input_api.py"],
# args = ["--as-test", "--stop-reward=-300", "--stop-iters=1"]
# )

#@OldAPIStack
py_test(
name = "examples/offline_rl/offline_rl_torch_old_api_stack",
Expand Down
57 changes: 0 additions & 57 deletions rllib/examples/_old_api_stack/complex_struct_space.py

This file was deleted.

Loading

0 comments on commit a90aa29

Please sign in to comment.