[ci] Surface worker process logs on perf hard regressions - #1701
Open
yogyam wants to merge 1 commit into
Open
Conversation
Contributor
Merge Protections🔴 1 of 1 protections blocking · waiting on 👀 reviews and 🤖 CI
🔴 PR merge requirementsWaiting for
This rule is failing.
|
Contributor
|
This PR has merge conflicts with the base branch. Please rebase: git fetch origin main
git rebase origin/main
# Resolve any conflicts, then:
git push --force-with-lease |
yogyam
force-pushed
the
ci/1604-worker-logs-on-perf-regression
branch
from
August 11, 2026 18:27
780bdae to
c0fe954
Compare
yogyam
force-pushed
the
ci/1604-worker-logs-on-perf-regression
branch
2 times, most recently
from
August 26, 2026 19:24
0dd3d55 to
f247ad4
Compare
yogyam
force-pushed
the
ci/1604-worker-logs-on-perf-regression
branch
4 times, most recently
from
September 2, 2026 22:21
e0054ad to
0eccbe7
Compare
When the performance CI failed on a fixed-threshold breach, the only output was a one-line message like "wan-t2v-1.3b-2gpu dit_time_s exceeded fixed threshold (current=18.252, threshold=10.000)" - the worker-process logs that explain why were never persisted or attached. Capture worker logs per benchmark run via the existing executor log_queue mechanism into a size-capped per-benchmark file, record its path in the raw result (worker_log_path), print a 200-line tail on hard-regression failures in both the pytest path (PR runs) and the compare_baseline path (scheduled runs), and upload the log files as Buildkite artifacts. Fixes hao-ai-lab#1604 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
yogyam
force-pushed
the
ci/1604-worker-logs-on-perf-regression
branch
from
September 5, 2026 04:08
0eccbe7 to
9aa675e
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Fixes #1604.
When the performance CI fails on a hard regression, the only output is a one-liner like:
Inference runs in per-GPU worker subprocesses, and their logs — which explain why the run got slow (backend fallback, compilation miss, exception on a slow path, ...) — are never persisted or attributed to the failure. This PR captures worker logs per benchmark run and surfaces them on hard-regression failures.
Changes
fastvideo/tests/performance/worker_log_capture.py(stdlib-only):WorkerLogCaptureconsumes the executor's worker log queue via aQueueListenerinto a size-cappedRotatingFileHandler(10MB, backupCount=1, rollover keeps the recent tail) atresults/worker_logs/worker_<benchmark_id>_<ts>.log;format_worker_log_tail()renders a delimited 200-line tail.test_inference_performance.py: passes the queue toVideoGenerator.from_pretrainedonly (workers keep the handler for their lifetime → model load + warmups + measured runs all captured; passing it togenerate_videowould detach it after the first call).finallyorders shutdown → drain → copy to$PERF_REPORTS_DIR/worker_logs/. Raw record gains a nullableworker_log_pathfield. Threshold assertions print the log tail before re-raising — covers PR runs, where a pytest failure meanscompare_baseline.pynever executes.compare_baseline.py: prints the same tail after the failure list for records that breached a fixed threshold — covers scheduled runs (PERF_UPLOAD_POLICY=always), the path producing the message quoted in the issue. Old/HF-synced records without the field degrade to an explicit "worker log unavailable" block. The field is deliberately not added to normalized/uploaded records..buildkite/scripts/lanes/performance.sh(the Slurm perf lane): one addedcp -rf results/worker_logs "$PERF_REPORTS_DIR/"next to the existing JSON copy, so the full log lands in/workspace/artifacts/performance/and is relayed by the CI host as a build artifact even when nothing prints. (An earlier revision of this PR put this inpr_test.sh; dropped after the Slurm migration marked that script dormant.)docs/contributing/performance_benchmarks.mddocuments the field, the artifact, and the coverage caveat (only thefastvideologger is forwarded — no torch/NCCL/raw stderr; ranks > 0 suppresslogger.infoby default, so capture = rank-0 INFO + all-rank WARNING/ERROR).Test Plan
pytest fastvideo/tests/performance/test_worker_log_capture.py \ fastvideo/tests/performance/test_compare_baseline_policy.py \ fastvideo/tests/performance/test_inference_performance_result_schema.py bash -n .buildkite/scripts/pr_test.sh # End-to-end repro of the issue's exact scenario through the real compare_baseline.main()Test Results
Test output
Developed on Apple Silicon (no CUDA): the real worker-log content and the Buildkite artifact upload need a GPU run — requesting
/test performance. To watch the failure path fire end-to-end, temporarily loweringmax_dit_time_sin.buildkite/performance-benchmarks/tests/wan-t2v-1.3b.jsonon a scratch branch reproduces it (the issue's own repro instruction).Checklist
pre-commit run --all-filesand fixed all issues (fastvideo/tests/is intentionally pre-commit-excluded;pr_test.shand docs are covered and pass)docs/contributing/performance_benchmarks.md)🤖 Generated with Claude Code