feat(submitit): add wait_for_completion option for fire-and-forget job submission#3128
Open
ListIndexOutOfRange wants to merge 1 commit intofacebookresearch:mainfrom
Open
Conversation
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.
Summary
Adds a
wait_for_completionconfig option to the submitit launcher. When set toFalse, jobs are submitted and the launcher returns immediately without waiting for results.Motivation
This is useful for long-running jobs (e.g., model training) when we don't want the submitting process to block.
Usage
Example output
Design consideration
It seems like this feature was requested a few times and my approach is suspiciously simple, so I guess I'm missing something.
For now, I wanted this PR to be non-invasive. It does not require modifications to Hydra core. The thing is, as noted in #2479, "Hydra's BasicSweeper collects the returned values from each job in the sweep". Thus, I chose to return placeholders values, such as
JobStatus.COMPLETED. A more invasive, perhaps cleaner way, of doing things would be to create a new JobStatus, like SUBMITTED or INPROGRESS ?Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
I guess a simple test with
wait_for_completion=Trueis enough. I'll add it later if we agree on the usefulness and design.Related Issues and PRs