Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Commit

Permalink
Add support for tune,serve,rllib tests to flaky builder (#15447)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericl authored Apr 22, 2021
1 parent 5377420 commit af01a47
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 27 deletions.
35 changes: 18 additions & 17 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
conditions: ["RAY_CI_PYTHON_AFFECTED"]
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
- RLLIB_TESTING=1 TF_VERSION=2.1.0 TFP_VERSION=0.8 TORCH_VERSION=1.6 ./ci/travis/install-dependencies.sh
- bazel test --config=ci $(./scripts/bazel_export_options)
--build_tests_only
--test_tag_filters=flaky
Expand All @@ -102,7 +103,7 @@
--test_env=CONDA_SHLVL
--test_env=CONDA_PREFIX
--test_env=CONDA_DEFAULT_ENV
python/ray/tests/...
python/ray/tests/... python/ray/serve/... python/ray/tune/... rllib/...
- label: ":python: (Small & Large)"
conditions: ["RAY_CI_PYTHON_AFFECTED"]
commands:
Expand All @@ -116,7 +117,7 @@
--test_env=CONDA_DEFAULT_ENV
python/ray/tests/...
- bazel test --config=ci $(./scripts/bazel_export_options)
--test_tag_filters=-kubernetes,-jenkins_only,client_tests
--test_tag_filters=-kubernetes,-jenkins_only,client_tests,-flaky
--test_env=RAY_CLIENT_MODE=1
python/ray/tests/...
- label: ":python: (Medium A-J)"
Expand All @@ -141,7 +142,7 @@
- RLLIB_TESTING=1 TF_VERSION=2.1.0 TFP_VERSION=0.8 TORCH_VERSION=1.6 ./ci/travis/install-dependencies.sh
- bazel test --config=ci $(./scripts/bazel_export_options)
--build_tests_only
--test_tag_filters=learning_tests_tf
--test_tag_filters=learning_tests_tf,-flaky
rllib/...
- label: ":brain: RLlib: Learning tests with tf=1.x (from rllib/tuned_examples/*.yaml)"
conditions: ["RAY_CI_RLLIB_AFFECTED"]
Expand All @@ -150,7 +151,7 @@
- RLLIB_TESTING=1 TF_VERSION=1.14.0 TFP_VERSION=0.7 TORCH_VERSION=1.6 ./ci/travis/install-dependencies.sh
- bazel test --config=ci $(./scripts/bazel_export_options)
--build_tests_only
--test_tag_filters=learning_tests_tf
--test_tag_filters=learning_tests_tf,-flaky
rllib/...
- label: ":brain: RLlib: Learning tests with Torch (from rllib/tuned_examples/*.yaml)"
conditions: ["RAY_CI_RLLIB_AFFECTED"]
Expand All @@ -159,7 +160,7 @@
- RLLIB_TESTING=1 TF_VERSION=2.1.0 TFP_VERSION=0.8 TORCH_VERSION=1.6 ./ci/travis/install-dependencies.sh
- bazel test --config=ci $(./scripts/bazel_export_options)
--build_tests_only
--test_tag_filters=learning_tests_torch
--test_tag_filters=learning_tests_torch,-flaky
rllib/...
- label: ":brain: RLlib: Quick Agent train.py runs"
conditions: ["RAY_CI_RLLIB_AFFECTED"]
Expand All @@ -168,7 +169,7 @@
- RLLIB_TESTING=1 TF_VERSION=2.1.0 TFP_VERSION=0.8 TORCH_VERSION=1.6 ./ci/travis/install-dependencies.sh
- bazel test --config=ci $(./scripts/bazel_export_options)
--build_tests_only
--test_tag_filters=quick_train
--test_tag_filters=quick_train,-flaky
--test_env=RAY_USE_MULTIPROCESSING_CPU_COUNT=1
rllib/...

Expand All @@ -181,7 +182,7 @@
# "learning_tests|quick_train|examples|tests_dir".
- bazel test --config=ci $(./scripts/bazel_export_options)
--build_tests_only
--test_tag_filters=-learning_tests_tf,-learning_tests_torch,-quick_train,-examples,-tests_dir
--test_tag_filters=-learning_tests_tf,-learning_tests_torch,-quick_train,-examples,-tests_dir,-flaky
--test_env=RAY_USE_MULTIPROCESSING_CPU_COUNT=1
rllib/...

Expand All @@ -191,44 +192,44 @@
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
- RLLIB_TESTING=1 TF_VERSION=2.1.0 TFP_VERSION=0.8 TORCH_VERSION=1.6 ./ci/travis/install-dependencies.sh
- bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only
--test_tag_filters=examples_A,examples_B --test_env=RAY_USE_MULTIPROCESSING_CPU_COUNT=1 rllib/...
--test_tag_filters=examples_A,examples_B,-flaky --test_env=RAY_USE_MULTIPROCESSING_CPU_COUNT=1 rllib/...
- bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only
--test_tag_filters=examples_C,examples_D --test_env=RAY_USE_MULTIPROCESSING_CPU_COUNT=1 rllib/...
--test_tag_filters=examples_C,examples_D,-flaky --test_env=RAY_USE_MULTIPROCESSING_CPU_COUNT=1 rllib/...

- label: ":brain: RLlib: rllib/examples/ {2/2}"
conditions: ["RAY_CI_RLLIB_AFFECTED"]
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
- RLLIB_TESTING=1 TF_VERSION=2.1.0 TFP_VERSION=0.8 TORCH_VERSION=1.6 ./ci/travis/install-dependencies.sh
- bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only
--test_tag_filters=examples_E,examples_F,examples_G,examples_H,examples_I,examples_J,examples_K,examples_L,examples_M,examples_N,examples_O,examples_P --test_env=RAY_USE_MULTIPROCESSING_CPU_COUNT=1
--test_tag_filters=examples_E,examples_F,examples_G,examples_H,examples_I,examples_J,examples_K,examples_L,examples_M,examples_N,examples_O,examples_P,-flaky --test_env=RAY_USE_MULTIPROCESSING_CPU_COUNT=1
rllib/...
- bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only
--test_tag_filters=examples_Q,examples_R,examples_S,examples_T,examples_U,examples_V,examples_W,examples_X,examples_Y,examples_Z --test_env=RAY_USE_MULTIPROCESSING_CPU_COUNT=1
--test_tag_filters=examples_Q,examples_R,examples_S,examples_T,examples_U,examples_V,examples_W,examples_X,examples_Y,examples_Z,-flaky --test_env=RAY_USE_MULTIPROCESSING_CPU_COUNT=1
rllib/...
- label: ":brain: RLlib: rllib/tests/ (A-L)"
conditions: ["RAY_CI_RLLIB_AFFECTED"]
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
- RLLIB_TESTING=1 TF_VERSION=2.1.0 TFP_VERSION=0.8 TORCH_VERSION=1.6 ./ci/travis/install-dependencies.sh
- bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only
--test_tag_filters=tests_dir_A,tests_dir_B,tests_dir_C,tests_dir_D,tests_dir_E,tests_dir_F,tests_dir_G,tests_dir_H,tests_dir_I,tests_dir_J,tests_dir_K,tests_dir_L --test_env=RAY_USE_MULTIPROCESSING_CPU_COUNT=1
--test_tag_filters=tests_dir_A,tests_dir_B,tests_dir_C,tests_dir_D,tests_dir_E,tests_dir_F,tests_dir_G,tests_dir_H,tests_dir_I,tests_dir_J,tests_dir_K,tests_dir_L,-flaky --test_env=RAY_USE_MULTIPROCESSING_CPU_COUNT=1
rllib/...
- label: ":brain: RLlib: rllib/tests/ (M-Z)"
conditions: ["RAY_CI_RLLIB_AFFECTED"]
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
- RLLIB_TESTING=1 TF_VERSION=2.1.0 TFP_VERSION=0.8 TORCH_VERSION=1.6 ./ci/travis/install-dependencies.sh
- bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only
--test_tag_filters=tests_dir_M,tests_dir_N,tests_dir_O,tests_dir_P,tests_dir_Q,tests_dir_R,tests_dir_S,tests_dir_T,tests_dir_U,tests_dir_V,tests_dir_W,tests_dir_X,tests_dir_Y,tests_dir_Z --test_env=RAY_USE_MULTIPROCESSING_CPU_COUNT=1
--test_tag_filters=tests_dir_M,tests_dir_N,tests_dir_O,tests_dir_P,tests_dir_Q,tests_dir_R,tests_dir_S,tests_dir_T,tests_dir_U,tests_dir_V,tests_dir_W,tests_dir_X,tests_dir_Y,tests_dir_Z,-flaky --test_env=RAY_USE_MULTIPROCESSING_CPU_COUNT=1
rllib/...

- label: ":octopus: Tune tests and examples {1/2}"
conditions: ["RAY_CI_TUNE_AFFECTED"]
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
- TUNE_TESTING=1 ./ci/travis/install-dependencies.sh
- bazel test --config=ci $(./scripts/bazel_export_options) --test_tag_filters=-jenkins_only,-example python/ray/tune/...
- bazel test --config=ci $(./scripts/bazel_export_options) --test_tag_filters=-jenkins_only,-example,-flaky python/ray/tune/...
- bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only --test_tag_filters=example,-tf,-pytorch,-py37,-flaky python/ray/tune/...

- label: ":octopus: Tune tests and examples {2/2}"
Expand All @@ -245,8 +246,8 @@
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
- SGD_TESTING=1 ./ci/travis/install-dependencies.sh
- bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only --test_tag_filters=tf,-pytorch,-py37 python/ray/util/sgd/...
- bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only --test_tag_filters=-tf,pytorch,-py37 python/ray/util/sgd/...
- bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only --test_tag_filters=tf,-pytorch,-py37,-flaky python/ray/util/sgd/...
- bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only --test_tag_filters=-tf,pytorch,-py37,-flaky python/ray/util/sgd/...

- label: ":octopus: Tune/SGD tests and examples. Python 3.7"
conditions: ["RAY_CI_TUNE_AFFECTED", "RAY_CI_SGD_AFFECTED"]
Expand All @@ -255,7 +256,7 @@
- TUNE_TESTING=1 PYTHON=3.7 INSTALL_HOROVOD=1 ./ci/travis/install-dependencies.sh
# Because Python version changed, we need to re-install Ray here
- rm -rf ./python/ray/thirdparty_files; ./ci/travis/ci.sh build
- bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only --test_tag_filters=py37 python/ray/tune/...
- bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only --test_tag_filters=py37,-flaky python/ray/tune/...
- bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only python/ray/util/xgboost/...

- label: ":book: Doc tests and examples"
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ matrix:
- ./ci/suppress_output bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only --test_tag_filters=-flaky -- //:all -rllib/... -core_worker_test

# ray serve tests
- if [ $RAY_CI_SERVE_AFFECTED == "1" ]; then ./ci/keep_alive bazel test --config=ci $(./scripts/bazel_export_options) --test_tag_filters=-jenkins_only python/ray/serve/...; fi
- if [ $RAY_CI_SERVE_AFFECTED == "1" ]; then ./ci/keep_alive bazel test --config=ci $(./scripts/bazel_export_options) --test_tag_filters=-jenkins_only,-flaky python/ray/serve/...; fi

# ray new dashboard tests
- if [ "$RAY_CI_DASHBOARD_AFFECTED" == "1" ]; then ./ci/keep_alive bazel test python/ray/new_dashboard/...; fi
Expand Down
2 changes: 1 addition & 1 deletion python/ray/serve/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ py_test(
name = "test_router",
size = "small",
srcs = serve_tests_srcs,
tags = ["exclusive"],
tags = ["exclusive", "flaky"],
deps = [":serve_lib"],
)

Expand Down
6 changes: 4 additions & 2 deletions python/ray/tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,9 @@ py_test_module_list(
"test_multi_node.py",
"test_multi_node_2.py",
"test_multi_node_3.py",
"test_multi_tenancy.py",
"test_multinode_failures.py",
"test_multinode_failures_2.py",
"test_multiprocessing.py",
"test_object_manager.py",
"test_object_spilling.py",
"test_output.py",
"test_reconstruction.py",
Expand All @@ -87,7 +85,9 @@ py_test_module_list(
py_test_module_list(
files = [
"test_object_spilling_2.py",
"test_object_manager.py",
"test_reference_counting_2.py",
"test_multi_tenancy.py",
],
size = "medium",
extra_srcs = SRCS,
Expand Down Expand Up @@ -202,6 +202,8 @@ py_test(
deps = ["//:ray_lib"],
)

# TODO(ekl) we can't currently support tagging these as flaky since there's
# no way to filter by both flaky and client mode tests in bazel.
py_test_module_list(
files = [
"test_actor.py",
Expand Down
2 changes: 1 addition & 1 deletion python/ray/tune/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ py_test(
size = "large",
srcs = ["examples/pbt_transformers/pbt_transformers.py"],
deps = [":tune_lib"],
tags = ["flaky", "exclusive", "example"],
tags = ["exclusive", "example"],
args = ["--smoke-test"]
)

Expand Down
10 changes: 5 additions & 5 deletions rllib/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ py_test(
# PPO: DDPPO
py_test(
name = "test_ddppo",
tags = ["agents_dir"],
tags = ["agents_dir", "flaky"],
size = "small",
srcs = ["agents/ppo/tests/test_ddppo.py"]
)
Expand Down Expand Up @@ -1170,7 +1170,7 @@ py_test(

py_test(
name = "test_distributions",
tags = ["models"],
tags = ["models", "flaky"],
size = "medium",
srcs = ["models/tests/test_distributions.py"]
)
Expand Down Expand Up @@ -1262,7 +1262,7 @@ py_test(

py_test(
name = "test_curiosity",
tags = ["utils"],
tags = ["utils", "flaky"],
size = "large",
srcs = ["utils/exploration/tests/test_curiosity.py"]
)
Expand Down Expand Up @@ -1434,7 +1434,7 @@ py_test(

py_test(
name = "tests/test_io",
tags = ["tests_dir", "tests_dir_I"],
tags = ["tests_dir", "tests_dir_I", "flaky"],
size = "large",
srcs = ["tests/test_io.py"]
)
Expand Down Expand Up @@ -1852,7 +1852,7 @@ py_test(
py_test(
name = "examples/custom_env_torch",
main = "examples/custom_env.py",
tags = ["examples", "examples_C"],
tags = ["examples", "examples_C", "flaky"],
size = "medium",
srcs = ["examples/custom_env.py"],
args = ["--as-test", "--torch"]
Expand Down

0 comments on commit af01a47

Please sign in to comment.