Repository navigation
[Documentation] User story: harvest idle compute time with workers on an overflow queue - #1130
Draft
jan-janssen wants to merge 1 commit into
Draft
jan-janssen wants to merge 1 commit into
jan-janssen wants to merge 1 commit into
Conversation
Story 13 demonstrates the SlurmClusterExecutor with block_allocation=True and restart_limit: long-lived worker jobs which are replaced when SLURM preempts them, for harvesting idle compute time on an overflow partition. The notebook cancels a worker with scancel while it is idle and while it executes a call, and shows that the calls are executed by the remaining and the replacement workers. It recommends #SBATCH --no-requeue, as a requeued job keeps its job ID and would be considered alive. Part of #1128 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Notebooks changed:
Review visual diffs and comment on any notebook cell. All comments sync back to this PR. Powered by ReviewNB |
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## slurm-cluster-restart-limit #1130 +/- ##
============================================================
Coverage 94.18% 94.18%
============================================================
Files 39 39
Lines 2220 2220
============================================================
Hits 2091 2091
Misses 129 129 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Stacked on #1129, so the base is
slurm-cluster-restart-limit. Please merge #1129 first; GitHub then retargets this PR tomain.Closes #1128 together with #1129.
Summary
New user story
notebooks/story-13-overflow-queue-workers.ipynb: Harvest Idle Compute Time with Workers on an Overflow Queue. It covers theSlurmClusterExecutorwithblock_allocation=True, which no story notebook covered before (#1128), and the newrestart_limitfrom #1129:SlurmClusterExecutor(max_workers=2, block_allocation=True, restart_limit=10, ...). Eight calls are executed by two SLURM jobs; theSLURM_JOB_IDreturned by each call shows which worker ran it.scancelon one worker job; the next calls run on the remaining worker and on a replacement job with a new job ID.restart_limitis reached (text only): the remaining workers take over, then the futures fail withExecutorlibSocketError. Also covers that the login-node process must keep running, that the cache keeps completed results, and thatinit_functionreruns in every replacement worker (with the Cache returns stale results with block_allocation + init_function: worker memory is not part of the cache key #1084 caveat aboutinit_function+cache_directory).The cluster-settings cell adds two lines specific to overflow queues:
##SBATCH --partition=overflow, disabled because the test cluster has only one partition#SBATCH --no-requeue: withPreemptMode=REQUEUE, SLURM requeues a preempted job under the same job ID. pysqa then reports it aspending, soPysqaSpawner.poll()treats the worker as alive and the executor waits forever for the interrupted call. With--no-requeue, the preempted job ends and executorlib submits the replacement itself. The notebook explains this.The story is added to
docs/_toc.ymland to both story lists inREADME.md.Testing
parameters-tagged settings cell, runs on the login node, noexecutorlib_ciallocation flag). Thenotebooks_slurmCI job therefore runs it on the single-node SLURM test cluster with realsbatch/scancel. This is the first CI run of theSlurmClusterExecutorblock-allocation path and of the worker resubmission throughPysqaSpawner, which [Feature] Restart cancelled block allocation workers in SlurmClusterExecutor #1129 could not test without SLURM..ci_support/run_notebooks.py --scheduler slurmkeeps all cells and runs it withoutsalloc. The notebook has not been executed yet; the CI result is the real test.🤖 Generated with Claude Code