Skip to content

[CI] Shard Async Engine/Inputs/Utils/Worker/Config (CPU) into 4 timing-balanced groups - #52348

Draft
khluu wants to merge 3 commits into
mainfrom
ci-shard-async-engine-cpu
Draft

[CI] Shard Async Engine/Inputs/Utils/Worker/Config (CPU) into 4 timing-balanced groups#52348
khluu wants to merge 3 commits into
mainfrom
ci-shard-async-engine-cpu

Conversation

@khluu

@khluu khluu commented Aug 14, 2026

Copy link
Copy Markdown
Member

Purpose

Phase 2 of the CI job-splitting effort (45–60m jobs → shards <20m). async-engine-inputs-utils-worker-config-cpu ran 53.0m in build 83851.

Validation (terminal, build 83933)

Targeted build 83933 on this exact head: 4/4 passed, walls 14.33 / 14.68 / 15.17 / 15.52m — max 15.52m with real margin (3.4× vs baseline).

  • tokenizers_ split (pytest-shard 2-way): both halves collected the full 926-item suite and ran disjoint manifests — shard 0 Running 450, shard 1 Running 476, 450 + 476 = 926 = collected, exact and disjoint by construction.
  • All 14 non-tokenizer commands executed exactly once (per-session collection from the logs): shard 0 = outputs(1), ray_env(16), sampling(11), parser(4067), transformers_utils(53); shard 1 = lazy_imports, envs(55), inputs(2), pooling(12), reasoning(460); shard 2 = multimodal cpu_test(258 selected/256 deselected by marker), config(128); shard 3 = renderers(426), tool_parsers(1072).
  • Fail-closed index guard ran first on every shard (0|1|2|3 validator).
  • Fixed setup: 1.85–1.87m/shard. Total CPU-min: 59.7 vs 53.0 baseline (+12.6%, cpu-small queue, no GPU); wall 53.0 → 15.52m.

History

First head (3-way) validated green in build 83920 but was rejected on the strict gate (walls 20.48/19.54/19.17m): total command time ≈53m + ~1.9m setup means even a perfectly balanced 3-way split floors at ≈19.6m. tokenizers_ (longest node 0.20m — no single-test floor) was therefore split 2-way and the job moved to parallelism: 4.

Notes

  • No open PR shards this job (checked gh pr list for the step key and file).
  • AI assistance was used for this change.

…g-balanced groups

Split the 15 sequential commands of async-engine-inputs-utils-worker-config-cpu
(~53m wall in build 83851) across parallelism: 3 using per-shard command guards.
Groups are balanced on measured per-command runtime, not command count:
shard 0 ~17.1m (tokenizers_ 16.5m + fast env tests), shard 1 ~17.1m
(multimodal, renderers, reasoning, pooling, ray), shard 2 ~16.8m
(tool_parsers, config, parser, transformers_utils, inputs/outputs/sampling).
Expected wall per shard ~19m incl. ~1.9m container setup. Timeout 65 -> 25.
Command set and flags are unchanged; every command runs on exactly one shard.

Signed-off-by: Kevin Luu <51931015+khluu@users.noreply.github.com>
@mergify mergify Bot added the ci/build label Aug 14, 2026
khluu added 2 commits August 14, 2026 14:19
…-way

Build 83920 measured walls 20.48/19.54/19.17m: the tokenizers_ shard
missed the <20m gate by 0.48m. Reconciliation shows total command time
~53m + ~1.9m per-shard setup, so even a perfectly balanced 3-way split
floors at ~19.6m - three-way cannot produce real margin while
tokenizers_ (17.4m) stays whole.

tokenizers_ is 1369 nodes with the longest at 0.20m (no single-test
floor), so it is pytest-sharded 2-way across shards 0-1 (simulated
sha256 bucket split: 8.5m/9.0m) and the remaining 14 commands are
statically grouped by measured runtime: shard 0 ~12.5m, shard 1 ~13.4m,
shard 2 ~13.2m, shard 3 ~13.4m of command time, ~15.3m walls incl.
setup. parallelism 3 -> 4 (cpu-small, no GPU); every non-tokenizers_
command still runs exactly once; tokenizers_ union is exact 2-way
pytest-shard by construction. Timeout stays 25.

Signed-off-by: Kevin Luu <51931015+khluu@users.noreply.github.com>
An index outside 0-3 would skip every per-shard guard and let the job
pass empty; validate BUILDKITE_PARALLEL_JOB explicitly before any test
command and exit 1 with a diagnostic otherwise.

Signed-off-by: Kevin Luu <51931015+khluu@users.noreply.github.com>
@khluu khluu changed the title [CI] Shard Async Engine/Inputs/Utils/Worker/Config (CPU) into 3 timing-balanced groups [CI] Shard Async Engine/Inputs/Utils/Worker/Config (CPU) into 4 timing-balanced groups Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant