Skip to content

Commit

Permalink
[RLlib][Data][build_base] Fix RLlib test build rules that should trig…
Browse files Browse the repository at this point in the history
…ger when there are dataset changes. (ray-project#33683)

* Made the instance type required for the rllib ray data tests larger

Signed-off-by: Kourosh Hakhamaneshi <[email protected]>
  • Loading branch information
kouroshHakha committed Mar 24, 2023
1 parent 3c0c0a1 commit 8b1c702
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 11 deletions.
39 changes: 35 additions & 4 deletions .buildkite/pipeline.ml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,18 +141,49 @@
--test_arg=--framework=torch
rllib/...

- label: ":brain: RLlib: RLlib tests on ray data"
- label: ":brain: RLlib: Learning tests Pytorch (With Ray Data)"
conditions: ["NO_WHEELS_REQUIRED", "RAY_CI_DATA_AFFECTED"]
instance_size: medium
instance_size: large
commands:
# skip on master cause we are running these test under all RLlib suites anyw/ay
- if [ "$BUILDKITE_PULL_REQUEST" != "false" ]; then exit 0; fi
- if [ "$BUILDKITE_PULL_REQUEST" = "false" ]; then exit 0; fi
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- RLLIB_TESTING=1 ./ci/env/install-dependencies.sh
- ./ci/env/env_info.sh
- bazel test --config=ci $(./ci/run/bazel_export_options)
--build_tests_only
--test_tag_filters=learning_tests_with_ray_data,-multi_gpu,-gpu,-tf_only,-tf2_only
--test_arg=--framework=torch
rllib/...


- label: ":brain: RLlib: Learning tests TF2 (With Ray Data)"
conditions: ["NO_WHEELS_REQUIRED", "RAY_CI_DATA_AFFECTED"]
instance_size: large
commands:
# skip on master cause we are running these test under all RLlib suites anyw/ay
- if [ "$BUILDKITE_PULL_REQUEST" = "false" ]; then exit 0; fi
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- RLLIB_TESTING=1 ./ci/env/install-dependencies.sh
- ./ci/env/env_info.sh
- bazel test --config=ci $(./ci/run/bazel_export_options)
--build_tests_only
--test_tag_filters=learning_tests_with_ray_data,-multi_gpu,-gpu,-torch_only
--test_arg=--framework=tf2
rllib/...

- label: ":brain: RLlib: Unit-tests (With Ray Data)"
conditions: ["NO_WHEELS_REQUIRED", "RAY_CI_DATA_AFFECTED"]
instance_size: large
commands:
# skip on master cause we are running these test under all RLlib suites anyw/ay
- if [ "$BUILDKITE_PULL_REQUEST" = "false" ]; then exit 0; fi
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- RLLIB_TESTING=1 ./ci/env/install-dependencies.sh
- ./ci/env/env_info.sh
- bazel test --config=ci $(./ci/run/bazel_export_options)
--build_tests_only
--test_tag_filters=ray_data,
--test_tag_filters=ray_data,-learning_tests_with_ray_data,-multi_gpu,-gpu
rllib/...

- label: ":brain: RLlib: Algorithm, Model and other tests"
Expand Down
2 changes: 1 addition & 1 deletion python/ray/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ class Dataset(Generic[T]):
>>> ds.map_batches(lambda batch: [v * 2 for v in batch])
MapBatches(<lambda>)
+- Dataset(num_blocks=17, num_rows=1000, schema=<class 'int'>)
>>> # Compute max.
>>> # Compute maximum
>>> ds.max()
999
>>> # Group the data.
Expand Down
13 changes: 7 additions & 6 deletions rllib/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# simple CartPole and more advanced variants of it.
# -- "fake_gpus": Tests that run using 2 fake GPUs.
# -- "ray_data": Tests that rely on ray_data.
# -- "learning_tests_with_ray_data": Learning tests that rely on ray_data.

# - Quick algo compilation/tune-train tests, tagged "quick_train".
# NOTE: These should be obsoleted in favor of "algorithms_dir" tests as
Expand Down Expand Up @@ -247,7 +248,7 @@ py_test(
py_test(
name = "learning_tests_pendulum_cql",
main = "tests/run_regression_tests.py",
tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous", "ray_data"],
tags = ["team:rllib", "exclusive", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous", "learning_tests_with_ray_data"],
size = "medium",
srcs = ["tests/run_regression_tests.py"],
# Include the zipped json data file as well.
Expand All @@ -263,7 +264,7 @@ py_test(
py_test(
name = "learning_tests_pendulum_crr",
main = "tests/run_regression_tests.py",
tags = ["team:rllib", "torch_only", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous", "ray_data"],
tags = ["team:rllib", "torch_only", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous", "learning_tests_with_ray_data"],
size = "large",
srcs = ["tests/run_regression_tests.py"],
# Include an offline json data file as well.
Expand All @@ -277,7 +278,7 @@ py_test(
py_test(
name = "learning_tests_cartpole_crr",
main = "tests/run_regression_tests.py",
tags = ["team:rllib", "torch_only", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "ray_data"],
tags = ["team:rllib", "torch_only", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "learning_tests_with_ray_data"],
size = "medium",
srcs = ["tests/run_regression_tests.py"],
# Include an offline json data file as well.
Expand All @@ -291,7 +292,7 @@ py_test(
py_test(
name = "learning_tests_cartpole_crr_expectation",
main = "tests/run_regression_tests.py",
tags = ["team:rllib", "torch_only", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "ray_data"],
tags = ["team:rllib", "torch_only", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "learning_tests_with_ray_data"],
size = "large",
srcs = ["tests/run_regression_tests.py"],
# Include an offline json data file as well.
Expand Down Expand Up @@ -392,7 +393,7 @@ py_test(
py_test(
name = "learning_tests_pendulum_dt",
main = "tests/run_regression_tests.py",
tags = ["team:rllib", "torch_only", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous", "ray_data"],
tags = ["team:rllib", "torch_only", "learning_tests", "learning_tests_pendulum", "learning_tests_continuous", "learning_tests_with_ray_data"],
size = "large",
srcs = ["tests/run_regression_tests.py"],
# Include an offline json data file as well.
Expand All @@ -406,7 +407,7 @@ py_test(
py_test(
name = "learning_tests_cartpole_dt",
main = "tests/run_regression_tests.py",
tags = ["team:rllib", "torch_only", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "ray_data"],
tags = ["team:rllib", "torch_only", "learning_tests", "learning_tests_cartpole", "learning_tests_discrete", "learning_tests_with_ray_data"],
size = "medium",
srcs = ["tests/run_regression_tests.py"],
# Include an offline json data file as well.
Expand Down

0 comments on commit 8b1c702

Please sign in to comment.