2022-02-27 08:07:34 +01:00
|
|
|
load("//bazel:python.bzl", "py_test_run_all_subdirectory")
|
|
|
|
load("//bazel:python.bzl", "py_test_run_all_notebooks")
|
|
|
|
|
2022-05-17 10:50:42 +02:00
|
|
|
exports_files(["test_myst_doc.py"])
|
|
|
|
|
2020-07-25 06:22:54 +02:00
|
|
|
# --------------------------------------------------------------------
|
[docs] new structure (#21776)
This PR consolidates both #21667 and #21759 (look there for features), but improves on them in the following way:
- [x] we reverted renaming of existing projects `tune`, `rllib`, `train`, `cluster`, `serve`, `raysgd` and `data` so that links won't break. I think my consolidation efforts with the `ray-` prefix were a little overeager in that regard. It's better like this. Only the creation of `ray-core` was a necessity, and some files moved into the `rllib` folder, so that should be relatively benign.
- [x] Additionally, we added Algolia `docsearch`, screenshot below. This is _much_ better than our current search. Caveat: there's a sphinx dependency that needs to be replaced (`sphinx-tabs`) by another, newer one (`sphinx-panels`), as the former prevents loading of the `algolia.js` library. Will follow-up in the next PR (hoping this one doesn't get re-re-re-re-reverted).
2022-01-22 00:42:05 +01:00
|
|
|
# Tests from the doc directory.
|
2020-07-25 06:22:54 +02:00
|
|
|
# Please keep these sorted alphabetically, but start with the
|
|
|
|
# root directory.
|
|
|
|
# --------------------------------------------------------------------
|
2021-10-05 09:17:33 -07:00
|
|
|
|
|
|
|
# Support for Dask has been dropped in 3.6.
|
|
|
|
py_test(
|
|
|
|
name = "dask_xgboost",
|
|
|
|
size = "medium",
|
2022-02-19 10:19:07 +01:00
|
|
|
main = "test_myst_doc.py",
|
|
|
|
srcs = ["test_myst_doc.py"],
|
2021-10-05 09:17:33 -07:00
|
|
|
tags = ["exclusive", "team:ml", "py37"],
|
2022-02-19 10:19:07 +01:00
|
|
|
data = ["//doc/source/ray-core/examples:core_examples"],
|
|
|
|
args = ["--path", "doc/source/ray-core/examples/dask_xgboost/dask_xgboost.ipynb",
|
|
|
|
"--smoke-test", "--address ''", "--num-actors 4", "--cpus-per-actor 1", "--num-actors-inference 4",
|
|
|
|
"--cpus-per-actor-inference 1"]
|
2021-10-05 09:17:33 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
# Support for Modin has been dropped in 3.6.
|
|
|
|
py_test(
|
|
|
|
name = "modin_xgboost",
|
|
|
|
size = "medium",
|
2022-02-19 10:19:07 +01:00
|
|
|
main = "test_myst_doc.py",
|
|
|
|
srcs = ["test_myst_doc.py"],
|
2021-10-05 09:17:33 -07:00
|
|
|
tags = ["exclusive", "team:ml", "py37"],
|
2022-02-19 10:19:07 +01:00
|
|
|
data = ["//doc/source/ray-core/examples:core_examples"],
|
|
|
|
args = ["--path", "doc/source/ray-core/examples/modin_xgboost/modin_xgboost.ipynb",
|
|
|
|
"--smoke-test", "--address ''", "--num-actors 4",
|
2021-10-05 09:17:33 -07:00
|
|
|
"--cpus-per-actor 1", "--num-actors-inference 4",
|
2022-02-19 10:19:07 +01:00
|
|
|
"--cpus-per-actor-inference 1"]
|
2021-10-05 09:17:33 -07:00
|
|
|
)
|
|
|
|
|
2022-01-27 02:14:25 +01:00
|
|
|
### Ray Data
|
|
|
|
py_test(
|
|
|
|
name = "quick_start",
|
|
|
|
size = "small",
|
2022-02-19 10:19:07 +01:00
|
|
|
srcs = ["source/data/doc_code/quick_start.py"],
|
2022-01-27 02:14:25 +01:00
|
|
|
tags = ["exclusive", "team:ml"]
|
|
|
|
)
|
|
|
|
|
2021-10-11 15:37:09 -07:00
|
|
|
py_test(
|
|
|
|
name = "big_data_ingestion",
|
|
|
|
size = "small",
|
2022-02-19 10:19:07 +01:00
|
|
|
main = "test_myst_doc.py",
|
|
|
|
srcs = ["test_myst_doc.py"],
|
|
|
|
args = ["--path", "doc/source/data/examples/big_data_ingestion.ipynb"],
|
|
|
|
data = ["//doc/source/data/examples:data_examples"],
|
2021-10-11 15:37:09 -07:00
|
|
|
tags = ["exclusive", "team:core", "py37"]
|
|
|
|
)
|
|
|
|
|
2022-03-10 21:46:07 -08:00
|
|
|
py_test(
|
|
|
|
name = "datasets_train",
|
|
|
|
size = "medium",
|
|
|
|
srcs = ["source/ray-core/_examples/datasets_train/datasets_train.py"],
|
|
|
|
tags = ["exclusive", "team:ml", "py37", "datasets_train"],
|
|
|
|
args = ["--smoke-test", "--num-workers=2", "--use-gpu"]
|
|
|
|
)
|
|
|
|
|
2021-04-13 14:20:26 -07:00
|
|
|
py_test(
|
|
|
|
name = "plot_hyperparameter",
|
|
|
|
size = "small",
|
2022-02-19 10:19:07 +01:00
|
|
|
main = "test_myst_doc.py",
|
|
|
|
srcs = ["test_myst_doc.py"],
|
|
|
|
args = ["--path", "doc/source/ray-core/examples/plot_hyperparameter.ipynb"],
|
|
|
|
data = ["//doc/source/ray-core/examples:core_examples"],
|
2021-08-18 18:38:31 -07:00
|
|
|
tags = ["exclusive", "team:ml"]
|
2021-04-13 14:20:26 -07:00
|
|
|
)
|
2020-07-25 06:22:54 +02:00
|
|
|
|
2021-04-13 14:20:26 -07:00
|
|
|
py_test(
|
|
|
|
name = "plot_parameter_server",
|
|
|
|
size = "medium",
|
2022-02-19 10:19:07 +01:00
|
|
|
main = "test_myst_doc.py",
|
|
|
|
srcs = ["test_myst_doc.py"],
|
|
|
|
args = ["--path", "doc/source/ray-core/examples/plot_parameter_server.ipynb"],
|
|
|
|
data = ["//doc/source/ray-core/examples:core_examples"],
|
2021-08-18 18:38:31 -07:00
|
|
|
tags = ["exclusive", "team:ml"]
|
2021-04-13 14:20:26 -07:00
|
|
|
)
|
2020-07-25 06:22:54 +02:00
|
|
|
|
2021-05-24 10:25:16 -07:00
|
|
|
py_test(
|
|
|
|
name = "plot_pong_example",
|
|
|
|
size = "large",
|
2022-02-19 10:19:07 +01:00
|
|
|
main = "test_myst_doc.py",
|
|
|
|
srcs = ["test_myst_doc.py"],
|
|
|
|
args = ["--path", "doc/source/ray-core/examples/plot_pong_example.ipynb"],
|
|
|
|
data = ["//doc/source/ray-core/examples:core_examples"],
|
2021-08-18 18:38:31 -07:00
|
|
|
tags = ["exclusive", "team:ml"]
|
2021-05-24 10:25:16 -07:00
|
|
|
)
|
2020-07-25 06:22:54 +02:00
|
|
|
|
2022-03-10 21:17:00 +01:00
|
|
|
# --------------------------------------------------------------------
|
|
|
|
# Test all doc/source/ray-core/doc_code code included in rst/md files.
|
|
|
|
# --------------------------------------------------------------------
|
2020-09-15 00:16:36 -07:00
|
|
|
|
2020-07-25 06:22:54 +02:00
|
|
|
py_test(
|
|
|
|
name = "doc_code_tf_example",
|
|
|
|
size = "small",
|
2022-02-19 10:19:07 +01:00
|
|
|
main = "source/ray-core/doc_code/tf_example.py",
|
|
|
|
srcs = ["source/ray-core/doc_code/tf_example.py"],
|
2021-08-18 18:38:31 -07:00
|
|
|
tags = ["exclusive", "tf", "team:ml"]
|
2020-07-25 06:22:54 +02:00
|
|
|
)
|
|
|
|
|
2021-03-03 15:46:32 -08:00
|
|
|
py_test(
|
|
|
|
name = "doc_code_torch_example",
|
|
|
|
size = "small",
|
2022-02-19 10:19:07 +01:00
|
|
|
main = "source/ray-core/doc_code/torch_example.py",
|
|
|
|
srcs = ["source/ray-core/doc_code/torch_example.py"],
|
2021-08-18 18:38:31 -07:00
|
|
|
tags = ["exclusive", "pytorch", "team:ml"]
|
2021-03-03 15:46:32 -08:00
|
|
|
)
|
2020-07-25 06:22:54 +02:00
|
|
|
|
2021-03-15 17:37:02 -05:00
|
|
|
py_test(
|
|
|
|
name = "doc_code_metrics_example",
|
|
|
|
size = "small",
|
2022-02-19 10:19:07 +01:00
|
|
|
main = "source/ray-core/doc_code/metrics_example.py",
|
|
|
|
srcs = ["source/ray-core/doc_code/metrics_example.py"],
|
2021-08-18 18:38:31 -07:00
|
|
|
tags = ["exclusive", "team:serve"]
|
2021-03-15 17:37:02 -05:00
|
|
|
)
|
|
|
|
|
2021-06-09 18:02:16 -07:00
|
|
|
py_test(
|
|
|
|
name = "doc_code_runtime_env_example",
|
|
|
|
size = "small",
|
2022-02-19 10:19:07 +01:00
|
|
|
main = "source/ray-core/doc_code/runtime_env_example.py",
|
|
|
|
srcs = ["source/ray-core/doc_code/runtime_env_example.py"],
|
2021-08-18 18:38:31 -07:00
|
|
|
tags = ["exclusive", "post_wheel_build", "team:serve"]
|
2021-06-09 18:02:16 -07:00
|
|
|
)
|
|
|
|
|
2022-05-16 09:49:42 -05:00
|
|
|
# --------------------------------------------------------------------
|
|
|
|
# Test all doc/source/serve/doc_code code included in rst/md files.
|
|
|
|
# --------------------------------------------------------------------
|
|
|
|
|
|
|
|
py_test_run_all_subdirectory(
|
|
|
|
size = "medium",
|
|
|
|
include = ["source/serve/doc_code/*.py"],
|
|
|
|
exclude = [],
|
|
|
|
extra_srcs = [],
|
|
|
|
tags = ["exclusive", "team:serve"],
|
2022-03-14 19:15:52 -07:00
|
|
|
)
|
|
|
|
|
2020-07-25 06:22:54 +02:00
|
|
|
|
2022-02-12 11:46:03 +01:00
|
|
|
|
2022-02-27 08:07:34 +01:00
|
|
|
# --------------------------------------------------------------------
|
|
|
|
# Test all doc/source/tune/doc_code code included in rst/md files.
|
|
|
|
# --------------------------------------------------------------------
|
2022-02-12 11:46:03 +01:00
|
|
|
|
2022-02-27 08:07:34 +01:00
|
|
|
py_test_run_all_subdirectory(
|
|
|
|
size = "medium",
|
|
|
|
include = ["source/tune/doc_code/*.py"],
|
|
|
|
exclude = [],
|
|
|
|
extra_srcs = [],
|
2022-02-12 11:46:03 +01:00
|
|
|
tags = ["exclusive", "team:ml"],
|
2022-03-08 16:50:57 +01:00
|
|
|
)
|
|
|
|
|
2022-05-13 01:29:59 -07:00
|
|
|
# --------------------------------------------------------------------
|
|
|
|
# Test all doc/source/ray-air/doc_code code included in rst/md files.
|
|
|
|
# --------------------------------------------------------------------
|
|
|
|
|
|
|
|
py_test_run_all_subdirectory(
|
|
|
|
size = "large",
|
|
|
|
include = ["source/ray-air/doc_code/*.py"],
|
|
|
|
exclude = [],
|
|
|
|
extra_srcs = [],
|
|
|
|
tags = ["exclusive", "team:ml"],
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2022-03-08 16:50:57 +01:00
|
|
|
# --------------------------------------------------------------------
|
2022-05-17 10:50:42 +02:00
|
|
|
# Test all doc/source/ray-overview/doc_test snippets, used on ray.io
|
2022-03-08 16:50:57 +01:00
|
|
|
# --------------------------------------------------------------------
|
|
|
|
|
|
|
|
py_test_run_all_subdirectory(
|
|
|
|
size = "small",
|
2022-05-17 10:50:42 +02:00
|
|
|
include = ["source/ray-overview/doc_test/*.py"],
|
|
|
|
exclude = ["source/ray-overview/doc_test/ray_data.py"],
|
2022-03-08 16:50:57 +01:00
|
|
|
extra_srcs = [],
|
|
|
|
tags = ["exclusive", "team:ml"],
|
2022-05-13 15:22:36 +01:00
|
|
|
)
|