-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support importing on workers in WDL #5103
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
33fa295
mirror import on workers update to wdl
stxue1 9a6612a
Merge master into issues/5025-import-on-workers-wdl
github-actions[bot] e90bfbe
Merge master into issues/5025-import-on-workers-wdl
github-actions[bot] a46a001
Apply suggestions from code review
stxue1 c55330c
Merge branch 'master' of github.com:DataBiosphere/toil into issues/50…
stxue1 413e3ea
Rename WDLRootJob, remove kebab case from WDL, and raise an error if …
stxue1 0fcdf35
Move out shared runner options
stxue1 d615a4e
Merge master into issues/5025-import-on-workers-wdl
github-actions[bot] 361551d
Add runner.py
stxue1 10f02f2
Merge branch 'issues/5025-import-on-workers-wdl' of github.com:DataBi…
stxue1 c6b4079
Merge branch 'master' of github.com:DataBiosphere/toil into issues/50…
stxue1 9329327
Add logDebug to giraffe workflow
stxue1 881ab9a
Add toil.import_file logic into the wdl import function
stxue1 1bc9b3e
Merge master into issues/5025-import-on-workers-wdl
github-actions[bot] b6f2ab0
Merge master into issues/5025-import-on-workers-wdl
github-actions[bot] b016723
Merge master into issues/5025-import-on-workers-wdl
github-actions[bot] f626dea
Merge master into issues/5025-import-on-workers-wdl
github-actions[bot] a1ebbf4
Merge master into issues/5025-import-on-workers-wdl
github-actions[bot] 7b2e167
Merge master into issues/5025-import-on-workers-wdl
github-actions[bot] 3ba0391
Reconnect test command argument to its option
adamnovak 0a17f9c
Merge master into issues/5025-import-on-workers-wdl
github-actions[bot] 3f8c8ca
Merge master into issues/5025-import-on-workers-wdl
github-actions[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from argparse import ArgumentParser | ||
from toil.lib.conversions import human2bytes | ||
|
||
|
||
def add_runner_options(parser: ArgumentParser, cwl: bool = False, wdl: bool = False) -> None: | ||
""" | ||
Add to the WDL or CWL runners options that are shared or the same between runners | ||
:param parser: parser to add arguments to | ||
:param cwl: bool | ||
:param wdl: bool | ||
:return: None | ||
""" | ||
# This function should be constructed so that even when wdl and cwl are false, the "default" options are still added | ||
run_imports_on_workers_arguments = ["--runImportsOnWorkers"] | ||
if cwl: | ||
run_imports_on_workers_arguments.append("--run-imports-on-workers") | ||
parser.add_argument(*run_imports_on_workers_arguments, action="store_true", default=False, dest="run_imports_on_workers", | ||
help="Run the file imports on a worker instead of the leader. This is useful if the leader is not optimized for high network performance. " | ||
"If set to true, the argument --importWorkersDisk must also be set.") | ||
import_workers_disk_arguments = ["--importWorkersDisk"] | ||
if cwl: | ||
import_workers_disk_arguments.append("--import-workers-disk") | ||
parser.add_argument(*import_workers_disk_arguments, dest="import_workers_disk", type=lambda x: human2bytes(str(x)), default=None, | ||
help="Specify the amount of disk space an import worker will use. If file streaming for input files is not available, " | ||
"this should be set to the size of the largest input file. This must be set in conjunction with the argument runImportsOnWorkers.") |
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we usually like to make new boolean options use
str2bool
and acceptFalse
/True
, since we've been upgrading so many of the old ones to that format. Maybe we should upgrade this one too?