[Core] Parallelize OCI object storage model verification (MD5) - #776
[Core] Parallelize OCI object storage model verification (MD5)#776fredericsun wants to merge 2 commits into
Conversation
Run OCI model file integrity checks concurrently while enforcing one pod-wide limit shared by all model tasks. Keep the default at one for backward compatibility. Signed-off-by: Yue Sun <25257139+fredericsun@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe model-agent adds a configurable pod-wide limit for concurrent OCI model file integrity checks. CLI and Helm settings pass the value to Gopher, which uses a shared limiter and concurrent verification workers. ChangesModel verification concurrency
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to The PR adds configurable parallel model verification while preserving serial defaults and existing mismatch handling; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant Gopher
participant VerificationWorkers
participant verificationLimiter
participant Validator
Gopher->>VerificationWorkers: verifyDownloadedFiles
VerificationWorkers->>verificationLimiter: acquire permit
verificationLimiter-->>VerificationWorkers: permit granted
VerificationWorkers->>Validator: validate model file
Validator-->>VerificationWorkers: validation result
VerificationWorkers->>verificationLimiter: release permit
VerificationWorkers-->>Gopher: validation errors and metrics
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Please run the following locally and commit the fixes: pre-commit run --all-files
git add -u && git commitSee CONTRIBUTING.md for setup instructions. |
Remove trailing whitespace reported by the repository-wide pre-commit checks. Signed-off-by: Yue Sun <25257139+fredericsun@users.noreply.github.com>
What this PR does
--model-verification-concurrency.1, preserving serial verification for a single model.Why we need it
Final MD5 verification is a significant bottleneck for large, sharded models because files were previously validated sequentially.
Parallel verification significantly reduces this phase. The pod-wide limiter prevents simultaneous model tasks from multiplying CPU and NVMe read pressure beyond the configured limit.
With the default value of
1, concurrent model tasks also share one verification slot. Deployments must explicitly configure a higher value, such as8, to enable the optimization.Validation
Validated with
gpt-oss-120b(195.8 GB) and a pod-wide verification concurrency of 8. Across 72 downloads, single-model final verification decreased from the serial baseline of ~324–329s to ~113–117s, while two concurrent models averaged ~125–127s per model. All 72 MD5 verifications passed, with no checksum mismatch, model-agent restart, or probe failure observedHow to test
go test ./pkg/modelagent ./cmd/model-agent helm lint charts/ome-resourcesThe test verify that:
1.1.Checklist
make testpasses locallySummary by CodeRabbit
New Features
Bug Fixes
Documentation