-
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
Allow importing on workers #5098
Conversation
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.
Looks good so far, but really needs a test.
src/toil/cwl/cwltoil.py
Outdated
@@ -3143,7 +3177,7 @@ def __init__( | |||
self.cwlwf = cwlwf | |||
self.cwljob = cwljob | |||
self.runtime_context = runtime_context | |||
self.cwlwf = remove_pickle_problems(self.cwlwf) | |||
self.cwlwf = self.cwlwf |
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.
No-op.
@@ -3111,7 +3141,11 @@ def hasChild(self, c: Job) -> Any: | |||
|
|||
|
|||
def remove_pickle_problems(obj: ProcessType) -> ProcessType: | |||
"""Doc_loader does not pickle correctly, causing Toil errors, remove from objects.""" | |||
""" |
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.
This function is only called in one place now, other than itself. Is it safe to remove and was the issue resolved?
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 it's still needed as I ran into this issue while creating the CWLImportJob. Something internal in the CWL tool object is unpickleable and must be removed. Before it was being called in every Job initialization, but now I moved it to be ran only once on the leader.
src/toil/cwl/cwltoil.py
Outdated
@@ -1,4 +1,5 @@ | |||
"""Implemented support for Common Workflow Language (CWL) for Toil.""" | |||
import argparse |
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.
Unused import?
@@ -281,6 +282,21 @@ def add_cwl_options(parser: ArgumentParser, suppress: bool = True) -> None: | |||
help=suppress_help or "Disable file streaming for files that have 'streamable' flag True", | |||
dest="disable_streaming", | |||
) | |||
parser.add_argument( | |||
"--runImportsOnWorkers", "--run-imports-on-workers", |
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.
Can we add a test for this?
You have to say the magic word "Fixes #5025" or Github won't auto-link the PR to the issue. |
I'm not sure why https://ucsc-ci.com/databiosphere/toil/-/jobs/78630 timed out. The main Gitlab server did not drop off the network, and the newly added test runs to completion quickly on my machine. |
Looks like the requested changes have been made.
#5025
Changelog Entry
To be copied to the draft changelog by merger:
--runImportsOnWorkers
to enable importing files on workers--importWorkersDisk
to control how much disk space the import worker will useReviewer Checklist
issues/XXXX-fix-the-thing
in the Toil repo, or from an external repo.camelCase
that want to be insnake_case
.docs/running/{cliOptions,cwl,wdl}.rst
Merger Checklist