Skip to content

Commit cd65cdf

Browse files
Aydin-abAydin Abiar
andauthored
[devprod] [ci] [tests] auto discover examples ci configs (#59478)
## Description i'm hoping to make the example publishing process smoother when setting up the CI for testings (release tests): Currently, when publishing examples and setting up release tests in CI, we have to manually tweak multiple BUILD.bazel to make our `ci/aws.yaml` and `ci/gce.yaml` discoverable to the CI release package (release/BUILD.bazel). It adds additional overhead/confusion to the writer and clutter the files over time solution: Consolidate all `ci/aws.yaml` and `gce.yaml` configs into a single filegroup under doc/BUILD.bazel. Discover that unique filegroup from release/BUILD.bazel The only requirement is to match the `doc/source/**/ci/aws.yaml` or `doc/source/**/ci/gce.yaml` pattern which maches our standard way to publish examples ### Changes - **Updated** `doc/BUILD.bazel` to define one single filegroup for all of `ci/` configs. Use glob patterns to catch all `aws.yaml` and `gce.yaml` under a `ci/` folder - **Updated** `release/BUILD.bazel` to reference that filegroup - **Updated** all inner doc/** BUILD.bazel accordingly with their own local filegroups ### Tests <details> <summary>Manual review with bazel query 'kind("source file", deps(//doc:all_examples_ci_configs))'</summary> ``` (repo_ray_docs) aydin@aydin-JCDF7JJD9H doc % bazel query 'kind("source file", deps(//doc:all_examples_ci_configs))' //doc:source/ray-overview/examples/e2e-audio/ci/aws.yaml //doc:source/ray-overview/examples/e2e-audio/ci/gce.yaml //doc:source/ray-overview/examples/e2e-multimodal-ai-workloads/ci/aws.yaml //doc:source/ray-overview/examples/e2e-multimodal-ai-workloads/ci/gce.yaml //doc:source/ray-overview/examples/e2e-rag/ci/aws.yaml //doc:source/ray-overview/examples/e2e-rag/ci/gce.yaml //doc:source/ray-overview/examples/e2e-timeseries/ci/aws.yaml //doc:source/ray-overview/examples/e2e-timeseries/ci/gce.yaml //doc:source/ray-overview/examples/e2e-xgboost/ci/aws.yaml //doc:source/ray-overview/examples/e2e-xgboost/ci/gce.yaml //doc:source/ray-overview/examples/entity-recognition-with-llms/ci/aws.yaml //doc:source/ray-overview/examples/entity-recognition-with-llms/ci/gce.yaml //doc:source/ray-overview/examples/langchain_agent_ray_serve/ci/aws.yaml //doc:source/ray-overview/examples/langchain_agent_ray_serve/ci/gce.yaml //doc:source/ray-overview/examples/llamafactory-llm-fine-tune/ci/aws.yaml //doc:source/ray-overview/examples/llamafactory-llm-fine-tune/ci/gce.yaml //doc:source/ray-overview/examples/mcp-ray-serve/ci/aws.yaml //doc:source/ray-overview/examples/mcp-ray-serve/ci/gce.yaml //doc:source/ray-overview/examples/object-detection/ci/aws.yaml //doc:source/ray-overview/examples/object-detection/ci/gce.yaml //doc:source/serve/tutorials/asynchronous-inference/ci/aws.yaml //doc:source/serve/tutorials/asynchronous-inference/ci/gce.yaml //doc:source/serve/tutorials/deployment-serve-llm/ci/aws.yaml //doc:source/serve/tutorials/deployment-serve-llm/ci/gce.yaml //doc/source/data/examples:unstructured_data_ingestion/ci/aws.yaml //doc/source/data/examples:unstructured_data_ingestion/ci/gce.yaml //doc/source/train/examples/pytorch:deepspeed_finetune/ci/aws.yaml //doc/source/train/examples/pytorch:deepspeed_finetune/ci/gce.yaml //doc/source/train/examples/pytorch:distributing-pytorch/ci/aws.yaml //doc/source/train/examples/pytorch:distributing-pytorch/ci/gce.yaml //doc/source/train/examples/pytorch:pytorch-fsdp/ci/aws.yaml //doc/source/train/examples/pytorch:pytorch-fsdp/ci/gce.yaml //doc/source/train/examples/pytorch:pytorch-profiling/ci/aws.yaml //doc/source/train/examples/pytorch:pytorch-profiling/ci/gce.yaml Loading: 1 packages loaded ``` </details> I also ran all release tests whose ci/ configs are affected by this change and verified that their ci/ configuration is still being read correctly (i.e., the Anyscale job is launched as expected). https://buildkite.com/ray-project/release/builds/73954# (test failure are due to application-level errors after launching the anyscale job, not because of this change) --------- Signed-off-by: Aydin Abiar <[email protected]> Signed-off-by: Aydin Abiar <[email protected]> Co-authored-by: Aydin Abiar <[email protected]>
1 parent 8c3a713 commit cd65cdf

File tree

13 files changed

+76
-45
lines changed

13 files changed

+76
-45
lines changed

doc/BUILD.bazel

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -710,22 +710,21 @@ doctest(
710710
# Discover the Anyscale Jobs compute configs .yaml for release tests in CI
711711
# --------------------------------------------------------------------
712712

713+
# Comprehensive filegroup that aggregates all CI compute configs from across the docs.
714+
# This includes a general glob pattern + references to filegroups in existing child BUILD.bazel
715+
# Following the standard structure: doc/source/<path>/my_example/ci/{aws,gce}.yaml
713716
filegroup(
714-
name = "example_configs",
717+
name = "all_examples_ci_configs",
715718
srcs = glob([
716-
"source/ray-overview/examples/**/*.yaml"
717-
]),
718-
visibility = ["//release:__pkg__"],
719-
)
720-
721-
filegroup(
722-
name = "deployment_serve_llm_example_configs",
723-
srcs = glob(["source/serve/tutorials/deployment-serve-llm/**/*.yaml"]),
724-
visibility = ["//release:__pkg__"],
725-
)
726-
727-
filegroup(
728-
name = "asynchronous_inference_example_configs",
729-
srcs = glob(["source/serve/tutorials/asynchronous-inference/**/*.yaml"]),
719+
"source/ray-overview/examples/**/ci/aws.yaml",
720+
"source/ray-overview/examples/**/ci/gce.yaml",
721+
"source/serve/tutorials/**/ci/aws.yaml",
722+
"source/serve/tutorials/**/ci/gce.yaml",
723+
]) + [
724+
"//doc/source/data/examples:data_examples_ci_configs",
725+
"//doc/source/tune/examples:tune_examples_ci_configs",
726+
"//doc/source/ray-core/examples:core_examples_ci_configs",
727+
"//doc/source/train/examples:train_examples_ci_configs",
728+
],
730729
visibility = ["//release:__pkg__"],
731730
)

doc/source/data/examples/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ py_test_run_all_notebooks(
1919
)
2020

2121
filegroup(
22-
name = "data_example_configs",
22+
name = "data_examples_ci_configs",
2323
srcs = glob([
2424
"**/ci/aws.yaml",
2525
"**/ci/gce.yaml"
2626
]),
27-
visibility = ["//release:__pkg__"],
27+
visibility = ["//doc:__pkg__"],
2828
)

doc/source/ray-core/examples/BUILD.bazel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,12 @@ filegroup(
33
srcs = glob(["*.ipynb"]),
44
visibility = ["//doc:__subpackages__"]
55
)
6+
7+
filegroup(
8+
name = "core_examples_ci_configs",
9+
srcs = glob([
10+
"**/ci/aws.yaml",
11+
"**/ci/gce.yaml",
12+
]),
13+
visibility = ["//doc:__pkg__"],
14+
)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
filegroup(
2+
name = "train_examples_ci_configs",
3+
srcs = glob([
4+
"**/ci/aws.yaml",
5+
"**/ci/gce.yaml",
6+
]) + [
7+
"//doc/source/train/examples/pytorch:pytorch_examples_ci_configs",
8+
"//doc/source/train/examples/transformers:transformers_examples_ci_configs",
9+
"//doc/source/train/examples/lightning:lightning_examples_ci_configs",
10+
],
11+
visibility = ["//doc:__pkg__"],
12+
)
13+

doc/source/train/examples/lightning/BUILD.bazel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,12 @@ py_test_run_all_notebooks(
2222
"team:ml",
2323
],
2424
)
25+
26+
filegroup(
27+
name = "lightning_examples_ci_configs",
28+
srcs = glob([
29+
"**/ci/aws.yaml",
30+
"**/ci/gce.yaml",
31+
]),
32+
visibility = ["//doc/source/train/examples:__pkg__"],
33+
)

doc/source/train/examples/pytorch/BUILD.bazel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,12 @@ py_test_run_all_notebooks(
3232
"team:ml",
3333
],
3434
)
35+
36+
filegroup(
37+
name = "pytorch_examples_ci_configs",
38+
srcs = glob([
39+
"**/ci/aws.yaml",
40+
"**/ci/gce.yaml",
41+
]),
42+
visibility = ["//doc/source/train/examples:__pkg__"],
43+
)

doc/source/train/examples/pytorch/deepspeed_finetune/ci/BUILD.bazel

Lines changed: 0 additions & 5 deletions
This file was deleted.

doc/source/train/examples/pytorch/distributing-pytorch/ci/BUILD.bazel

Lines changed: 0 additions & 5 deletions
This file was deleted.

doc/source/train/examples/pytorch/pytorch-fsdp/ci/BUILD.bazel

Lines changed: 0 additions & 5 deletions
This file was deleted.

doc/source/train/examples/pytorch/pytorch-profiling/ci/BUILD.bazel

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)