Repository navigation
Backend CI: run the context parallel compose gloo suite in its own shard - #16447
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…shards (#16634) ## Summary `Repo tests (CPU, gloo-tp-pp)` is at its 2100 s cap. On #16618, which only touches the Studio MLX worker, it was interrupted with the suite almost done: ``` !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! KeyboardInterrupt !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 174 passed, 7 skipped, 79 warnings, 320 subtests passed in 2088.59s (0:34:48) ##[error]Process completed with exit code 124. ``` The other recent runs of that job, across the last 20 PRs, took 30.5 to 36.2 minutes end to end, setup included, so a slightly slower runner is enough to tip it over. When this shard was created (#15951 split, #16447 comment) tensor plus pipeline parallel were about 1397 s. Pipeline parallel has grown a lot since then: every `torch.distributed.pipelining` schedule (#15655), per-stage sharded loading (#15656), no graph break on a non-last stage (#16167), and explicit-unscale overflow agreement (#16417). Nothing is wrong with those tests. The shard just outgrew its slot, the same way `gloo` did in #15951 and #16447. ## Change - `.github/workflows/studio-backend-ci.yml`: `gloo-tp-pp` becomes two shards with the same settings (`-n 4`, the 2100 s cap, the marker filter): - `gloo-tp`: `tests/test_tp_n*gloo*.py` (2 files); - `gloo-pp`: `tests/test_pp*gloo*.py` (8 files). - `tests/studio/test_backend_ci_parallel_isolation.py`: `test_the_command_scan_sees_the_parallel_run_and_the_serial_steps` pins the number of parallel pytest runs. It asks to be told when a shard is added, so its counts go from 12 to 13 parallel runs and from 9 to 10 repo-root shards. The selections are the old one split in two, so every file still runs exactly once. ## Testing - `tests/test_ci_repo_cpu_shards.py`: 15 passed. With `test_pp*gloo*` narrowed to `test_pp_[!n]*gloo*` as a sabotage, `test_no_file_is_dropped_or_run_twice` fails, so a dropped file is still caught. - `tests/studio/test_backend_ci_parallel_isolation.py`, `tests/test_ci_repo_cpu_shards.py` and the workflow and cache-budget guards under `tests/studio`: 164 passed. - The two new shards' run times on this PR's own CI are the real check. Both should finish well under the cap.
Summary
Since #16407,
Repo tests (CPU, gloo)sits right at its step cap. On main (9341351954) it ran 1922 s of the 2100 s cap. On #16444, against the same base, it hit the cap and was killed (exit code 124) after 145 of its 153 tests had passed.#16407 grew
tests/test_parallel_cp_compose_gloo.pyto 27 tests. I timed the shard per file locally (-n 4 --dist loadgroup --durations=0, the CI selection). That one file takes 1143 of the shard's 3605 test-seconds, about a third:test_parallel_cp_compose_gloo.pytest_tp_env_gloo.pytest_tp_replica_gloo.pytest_tp_full_finetune_gloo.pygloo-tp-ppcannot absorb it, because it already runs 1397 s on main.The file also cannot run four tests at a time on its own. Each test spawns 2 to 8 gloo ranks. In this PR's first two runs of a dedicated shard at
-n 4, the runner was shut down mid-run both times (The runner has received a shutdown signal, exit 143). Measured locally as summed PSS over the pytest process tree, the peak is:A hosted runner has 16 GB. In the mixed
glooshard, the file's tests were interleaved with lighter ones, so they rarely overlapped four at a time.Change
.github/workflows/studio-backend-ci.yml:gloo-cpshard:tests/test_parallel_c*gloo*.py, withworkers: 2.-n ${{ matrix.workers || 4 }}, so every other shard keeps-n 4.glooshard'stests/test_p[!p]*gloo*.pybecomestests/test_parallel_[!c]*gloo*.py. Its other globs are unchanged.*gloo*file namedtest_p[!ap]*would match no shard;tests/test_ci_repo_cpu_shards.pyreports that as a dropped file.tests/studio/test_backend_ci_parallel_isolation.py:workers(or the expression's default), the way it already substitutesselection. Before that, its existing "no unexpanded${{" assertion caught the new expression.Testing
tests/test_ci_repo_cpu_shards.pytests/test_ci_backend_pytest_shards.pytests/studio/test_backend_ci_parallel_isolation.pytests/test_rendezvous_port_everywhere.pytests/studio/test_cache_budget_discipline.pytests/test_parallel_cp_compose_gloo.pyat-n 2: 23 passed, 3 skipped.test_p[!ap]*gloo*.py, matched no file, and the guard's unexpanded-pattern check caught it. Hence the explicittest_parallel_globs.