mirror of
https://github.com/vale981/ray
synced 2025-03-07 02:51:39 -05:00

Currently, we are not running doc notebooks in CI due to a bazel misconfiguration - we are using `glob` in a top level package in order to get the paths for the notebooks, but those are contained inside subpackages, which glob purposefully ignores. Therefore, the lists of notebooks to run are empty. This PR fixes that by: * Running the `py_test_run_all_notebooks` macro inside the relevant subpackages * Editing the `test_myst_doc.py` script to allow for recursive search for the target file, allowing to deal with mismatches between `name` and `data` arguments in `py_test_run_all_notebooks` * Setting the `allow_empty=False` flag inside `glob` calls in our macros to ensure that this oversight is caught early * Enabling detection of changes in doc folder for `*.ipynb` and `BUILD` files This PR also adds a GPU runner for doc tests, allowing one of our examples to pass - and setting the infra for more to come. Finally, a misconfigured path for one set of doc tests is also fixed.
31 lines
No EOL
900 B
Text
31 lines
No EOL
900 B
Text
load("//bazel:python.bzl", "py_test_run_all_notebooks")
|
|
|
|
filegroup(
|
|
name = "tune_examples",
|
|
srcs = glob(["*.ipynb"]),
|
|
visibility = ["//doc:__subpackages__"]
|
|
)
|
|
|
|
# --------------------------------------------------------------------
|
|
# Test all doc/source/tune/examples notebooks.
|
|
# --------------------------------------------------------------------
|
|
|
|
# pbt_ppo_example.ipynb is not tested right now due to large resource
|
|
# requirements
|
|
|
|
py_test_run_all_notebooks(
|
|
size = "medium",
|
|
include = ["*.ipynb"],
|
|
exclude = ["pbt_ppo_example.ipynb", "tune-xgboost.ipynb"],
|
|
data = ["//doc/source/tune/examples:tune_examples"],
|
|
tags = ["exclusive", "team:ml"],
|
|
)
|
|
|
|
# GPU tests
|
|
py_test_run_all_notebooks(
|
|
size = "large",
|
|
include = ["tune-xgboost.ipynb"],
|
|
exclude = [],
|
|
data = ["//doc/source/tune/examples:tune_examples"],
|
|
tags = ["exclusive", "team:ml", "gpu"],
|
|
) |