← Back to Pull requests

Cover ZeRO-3 DP-resize rejection before serial checkpoint loading #8897

Open
unknown opened this pull request with 276 lines diff across 3 files
View on GitHub
unknown unknown commented on Oct 24, 2026 00:31 UTC
Author

Add regression coverage for ZeRO-3 rejecting legacy checkpoints with a different data-parallel size before serial checkpoint synchronization. The production preflight is already in merged #8891; this follow-up retains that upstream engine implementation and makes this PR test-only against master 9148ab22.

The regression saves real optimizer state at DP=1 and loads at DP=2 with both load_optimizer_states flags, serial loading enabled/disabled, and FP32/FP16/BF16. Every rank must raise the existing topology error and reach a barrier. The valid serial round trip now covers full-state and module-only loading with torch Adam.

Local validation on 2026-10-30: Apple M3, macOS 15.1 ARM64, Python 3.12.13, torch 2.14.1, CPU/Gloo:

DS_ACCELERATOR=cpu CUDA_VISIBLE_DEVICES=0,1,2,3 LOCAL_SIZE=4 GLOO_SOCKET_IFNAME=lo0 OMP_NUM_THREADS=1 PYTHONPATH=.:tests python -m pytest --forked tests/unit/checkpoint/test_zero_optimizer.py::TestZeRO3CheckpointDPChange tests/unit/checkpoint/test_zero_optimizer.py::TestZeROCheckpoint::test_pipeline_checkpoint_loading --torch_ver=2.14.1 -q

Result: 10 passed, 4 skipped (FP16 unsupported). Changed-file pre-commit passes. No training arithmetic, checkpoint format, or runtime code changes relative to current master. #8898 separately fixes token handoff for successful serial loads. Historical GPU results in the previous description apply to the original implementation, not this test-only integration; no new CUDA/NCCL, offload or multi-node validation is claimed.

Negative control: restricting the current preflight to load_optimizer_states=True leaves the serial masters-only case hung until the external 180-second deadline (exit 124). This is a timeout observation, not a normal pytest assertion failure. The original engine was restored in finally; that exact selected case then passes again. The final engine is byte-for-byte current master.

AI assistance (OpenAI Codex) was used to prepare and execute this follow-up. Published follow-up: ae939211 integrates upstream master 9148ab22 in the existing PR branch. The submitting human confirmed reviewing the final diff and running the relevant tests, and authorized DCO sign-off and publication.

Diff: 276 lines (+207 / -69) across 3 files Reviewer: Levius-Fubuki Review duration: 55068m
All Vouch review confidence checks passed
Residual risk 0.28 = Change Risk (0.47) × (1 − Review Confidence (0.41)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.47 · 276 lines diff across 3 files
0.47
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
40%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth shallow_review_depth
0.344
Diff Size diff_size
0.336
Real PR Conversation Timeline
1 comments
"Review active on #8897"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 40.9% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 46.6% (MEDIUM) · Higher = larger blast radius
46.6%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 40.9% · Lower = rushed or shallow review
40.9%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 27.5% · Safe to merge
27.5%