-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] Run doc notebooks in CI (#24816)
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.
- Loading branch information
Showing
8 changed files
with
101 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,19 @@ | ||
load("//bazel:python.bzl", "py_test_run_all_notebooks") | ||
|
||
filegroup( | ||
name = "air_examples", | ||
srcs = glob(["*.ipynb"]), | ||
visibility = ["//doc:__subpackages__"] | ||
) | ||
) | ||
|
||
# -------------------------------------------------------------------- | ||
# Test all doc/source/ray-air/examples notebooks. | ||
# -------------------------------------------------------------------- | ||
|
||
py_test_run_all_notebooks( | ||
size = "large", | ||
include = ["*.ipynb"], | ||
exclude = [], | ||
data = ["//doc/source/ray-air/examples:air_examples"], | ||
tags = ["exclusive", "team:ml"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,31 @@ | ||
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"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters