feat: run apply in current Slurm allocation - #360
Draft
anish-shanbhag wants to merge 3 commits into
Draft
anish-shanbhag wants to merge 3 commits into
anish-shanbhag wants to merge 3 commits into
Conversation
Signed-off-by: Anish Shanbhag <ashanbhag@nvidia.com>
Signed-off-by: Anish Shanbhag <ashanbhag@nvidia.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #360 +/- ##
=======================================
Coverage ? 72.41%
=======================================
Files ? 98
Lines ? 13593
Branches ? 0
=======================================
Hits ? 9844
Misses ? 3749
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: Anish Shanbhag <ashanbhag@nvidia.com>
Closed
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.
Problem this solves
Teams sometimes already hold a Slurm allocation through
salloc, a parent batch job, or an external scheduler, butsrtctl applyalways submits a newsbatchjob. That forces nested scheduling and prevents the normalsrun-based orchestration path from using resources the caller already owns. This change lets a single recipe reuse the inherited allocation while preserving the standard service, benchmark, and cleanup lifecycle.Summary
srtctl apply --current-allocationfor running a single recipe under the inheritedSLURM_JOB_IDsbatch, stage the runtime config under the existing job output directory, and invoke the normaldo_sweeporchestrator in the foreground--serve-onlybehaviorScope
This is intentionally a thin first implementation. It supports one regular recipe at a time. Directories, sweeps, override configs,
--bash,--mock,--json, and--tagsremain unsupported in this mode. Allocation fields such as account, partition, and time limit are not reapplied because the allocation already exists.Testing
pytest tests/test_submit_cli.py tests/test_apply_json.py tests/test_serve_only.py -v— 24 passedrun_in_current_allocationhelper plus every intentionally rejected execution/input moderuff check src/srtctl/cli/submit.py tests/test_submit_cli.pyruff format --check src/srtctl/cli/submit.py tests/test_submit_cli.pyQwen/Qwen3-0.6Binside an existing allocation, passed model-aware health, completed SA-Bench, and exited 0srunsteps; no nested job was submittedThe branch also corrects two stale test mock targets introduced by the current
mainrefactor. The same eval-only test failed on unmodifiedmainbecause it made a real health request instead of using its configured mock.