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

[Tune; RLlib] Move Tune tests that use RLlib into separate buildkite job. #20016

Conversation

sven1977
Copy link
Contributor

@sven1977 sven1977 commented Nov 3, 2021

Move Tune tests that use RLlib into separate buildkite (BK) job.

  • Created a tag "rllib" in the tune BUILD file.
  • Added a new Tune BK job that only runs those tune tests that depend on RLlib.

Why are these changes needed?

Related issue number

Checks

  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

- bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only --test_tag_filters=-tf,pytorch,-py37,-flaky,-soft_imports,-gpu_only,-rllib python/ray/tune/...

- label: ":octopus: Tune tests and examples {using RLlib}"
conditions: ["RAY_CI_TUNE_AFFECTED"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should you add RAY_CI_RLLIB_AFECTED here, so that these will run whenever rllib is changed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, it may also be worthwhile to take another pass over the condition definitions in determine_tests_to_run.py to double check we're not over/under-testing. Interestingly enough I stumbled upon a recent PR that removes an unused RAY_CI_ONLY_RLLIB_AFFECTED condition, not sure if we might actually want to add it back and use it for other RLLib test suites.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great point!
I re-instated the RLLIB_AFFECTED vs RLLIB_DIRECTLY_AFFECTED differentiation.

RLLIB_AFFECTED runs a sub-set of RLlib tests (the high-level learning tests + examples) and is triggered by changes in tune, etc.., non-RLlib sub-folders.

RLLIB_DIRECTLY_AFFECTED runs all RLlib tests and is only triggered upon changes in the rllib source files

- bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only --test_tag_filters=-tf,pytorch,-py37,-flaky,-soft_imports,-gpu_only,-rllib python/ray/tune/...

- label: ":octopus: Tune tests and examples {using RLlib}"
conditions: ["RAY_CI_TUNE_AFFECTED"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, it may also be worthwhile to take another pass over the condition definitions in determine_tests_to_run.py to double check we're not over/under-testing. Interestingly enough I stumbled upon a recent PR that removes an unused RAY_CI_ONLY_RLLIB_AFFECTED condition, not sure if we might actually want to add it back and use it for other RLLib test suites.

.buildkite/pipeline.yml Outdated Show resolved Hide resolved
.buildkite/pipeline.yml Outdated Show resolved Hide resolved
@sven1977
Copy link
Contributor Author

sven1977 commented Nov 3, 2021

Thanks for reviewing. @matthewdeng , please take another look.

Comment on lines 581 to 585
- TUNE_TESTING=1 PYTHON=3.7 ./ci/travis/install-dependencies.sh
# Because Python version changed, we need to re-install Ray here
- rm -rf ./python/ray/thirdparty_files; rm -rf ./python/ray/pickle5_files; ./ci/travis/ci.sh build
- bazel test --config=ci $(./scripts/bazel_export_options) --test_tag_filters=-example,-flaky,-py37,-soft_imports,-gpu_only,-rllib python/ray/tune/...
- bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only --test_tag_filters=example,-tf,-pytorch,-py37,-flaky,-soft_imports,-gpu_only,-rllib python/ray/tune/...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests explicitly have -py37, if we upgrade to PYTHON=3.7 can we remove the filter or are these already being tested with 3.7 in a different step?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the py37-tagged tests are run in a separate job here:

    - label: ":octopus: Tune/SGD/Modin/Dask tests and examples. Python 3.7"
...
    - TUNE_TESTING=1 PYTHON=3.7 INSTALL_HOROVOD=1 ./ci/travis/install-dependencies.sh
...
    HERE ->> - bazel test --config=ci $(./scripts/bazel_export_options) --build_tests_only --test_tag_filters=py37,-flaky,-client python/ray/tune/...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think this is outside the scope of this PR but the differentiation was there because the other tests were run on Python 3.6. Now the one marked as "Python 3.7" is running on 3.7 but so are the ones that aren't marked.

Comment on lines 77 to 79
# Whether only the most important (high-level) RLlib tests should
# be run.
RAY_CI_RLLIB_AFFECTED = 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: It's not clear when reading this when a test should be run with this condition. Is there some rule of thumb that we can describe here so that it's clear when this should be used as a condition instead of RAY_CI_RLLIB_DIRECTLY_AFFECTED?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point. I think RAY_CI_RLLIB_AFFECTED should focus on high level integration type of tests, since code outside of rllib shouldn't break individual functionalities.
DIRECTLY_AFFECTED should just run everything.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, @gjoliver , that's how I changed it:

Where "high-level tests" == RLlib learning tests.

…ing_separate_tune_plus_rllib_tests_into_own_bk_job

# Conflicts:
#	.buildkite/pipeline.yml
@sven1977
Copy link
Contributor Author

sven1977 commented Nov 4, 2021

@gjoliver @matthewdeng , please take another look. Addressed all remaining questions.

@sven1977 sven1977 added the tests-ok The tagger certifies test failures are unrelated and assumes personal liability. label Nov 4, 2021
Copy link
Member

@gjoliver gjoliver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@sven1977 sven1977 merged commit 50c30f8 into ray-project:master Nov 4, 2021
@sven1977 sven1977 deleted the testing_separate_tune_plus_rllib_tests_into_own_bk_job branch June 2, 2023 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests-ok The tagger certifies test failures are unrelated and assumes personal liability.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants