[FEAT] Automatic Experiment Rescheduling before SLURM timeout#156
Merged
Conversation
Grutschus
force-pushed
the
tigru/feat/automatic_restarts
branch
from
November 12, 2025 15:36
2b0588a to
d62dd6c
Compare
Grutschus
marked this pull request as ready for review
November 13, 2025 12:56
Grutschus
force-pushed
the
tigru/feat/automatic_restarts
branch
from
November 13, 2025 13:13
5badae6 to
03088e5
Compare
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.
On some SLURM clusters, the maximum runtime of an experiment is limited, requiring experiments to be resubmitted to the SLURM queue.
With this PR, I intend to add a feature to SEML that makes this process much easier.
The following example shows how SEML users may use this feature:
From the user's perspective, there are just two new components:
reschedule-function that is responsible for saving the experiment state before the SLURM timeout is reached. The function must return a dictionary containing updates to the config of the experiment that are required for the next run to pick up the saved experiment state. In practice, I expect this to be a checkpoint, for example.What does this implement?
reschedule_filepath once it receives the timeout signal.slurm.{sbatch_id}.reschedule_file: A template for the path experiments should look for the reschedule signal. This template is filled, regardless of whether the SLURM job successfully claims an experiment.execution.reschedule_file: The actual path at which the experiment should look for the signal.reschedule_config_update: The updates to the config due to the reschedule.reschedule_fileTODOs and Discussion
Limitations
The reschedule_config_update is leaked into the actual experiment's config due to the way that Sacred stores the config in the database.
This, of course, hurts reproducibility, but I have not found an easy way to prevent this. Open for suggestions.
Note: This PR already contains commits from #154 and #155