Add JIT preemption checkpointing with pvc/s3 checkpoint storage #145
All Vouch review confidence checks passed
Residual risk 0.12 = Change Risk (0.62) × (1 − Review Confidence (0.81)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.62 · 2812 lines diff across 14 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.66 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
Bedrock Claude 3 · Risk Narration
(disconnected)
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
Diff Size
diff_size
0.400
Real PR Conversation Timeline
1 comments
"Review active on #145"
general
weight: 0.35
efazal
Sridhar1030
Summary
Adds JIT (just-in-time) preemption checkpointing to Training Hub as default-flow callbacks, so any consumer (Kubeflow SDK, Ray, direct use) gets SIGTERM-safe checkpoint-and-resume for free — no SDK-side instrumentation needed.
API (all of
sft(),osft(),lora_sft()):Design
merge_default_callbacks()prepends hub default callbacks before user callbacks (hub hooks run first, per design discussion):-
lora_sft(Unsloth/HF): newJITCheckpointCallback— SIGTERM handler, save via HFTrainerControl.should_save(full trainer state),.incompletesentinel for interrupted saves, resume viatrainer.train(resume_from_checkpoint=...)decided in the backend before training starts.-
sft(instructlab-training) /osft(mini-trainer): delegate to the backends' nativeon_demand_checkpointing— they already own SIGTERM handling, distributed save, and auto-resume. Re-implementing in a callback would double-register signal handlers.TrainingArgsfields; requesting JIT on those now raises with an upgrade hint (instructlab-training >=0.16.2, mini-trainer >=0.8.3).checkpoint_storageselector:None/"pvc"= filesystem (SDK mounts the PVC and passes a path — unchanged behavior)."s3://bucket/prefix"=S3CheckpointSyncCallbackmirrors every saved checkpoint to S3 in the background (layout-preserving,.upload_completemarker written last), and on restart with an empty local dir the latest complete checkpoint is restored from S3 before training resumes. MinIO/on-prem supported viaAWS_ENDPOINT_URL(_S3).Testing
Cluster e2e (OpenShift, A100, real
oc delete podSIGTERM, pod restart, resume, completion):| Leg | Result |
|---|---|
| lora_sft kill/resume (hub callback) | ✅ 5/5 checks |
| sft kill/resume (instructlab native, 0.16.2) | ✅ 5/5 |
| osft kill/resume (mini-trainer native, 0.8.3+) | ✅ 5/5 |
| Edge: eval-enabled JIT save | ✅ |
| Edge: injected corrupt
.incompletecheckpoint skipped on resume | ✅ || Unit tests | ✅ 50/50 |
Draft — remaining before ready-for-review
enable_jit_checkpoint,checkpoint_storage, backend version floors[s3]) inpyproject.tomlFindings for reviewers / platform team
podReplacementPolicy+ replacement policy considerations apply for the SDK/controller).full_state(no sentinel validation upstream).podReplacementPolicy: Failedavoids the overlap.Jira: RHOAIENG-38119
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
New Features
Added just-in-time checkpointing to preserve training progress during preemption and resume automatically.
Added configurable remote object storage for checkpoint synchronization and restoration, with support for multiple storage backends.
Added validation to resume from the latest complete checkpoint in the selected training format while ignoring incomplete checkpoints.
Added callback support for requesting checkpoint saves and safely stopping training.
Added checkpoint mirroring across supported training backends, with upload failure detection.
Documentation
Added a guide covering JIT checkpointing, remote storage options, deployment, and troubleshooting.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->