-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
workflow level ResourceRequirements unable to access workflow level inputs #1330
Comments
Full traceback Traceback (most recent call last):
File "/home/michael/cwltool/cwltool/workflow_job.py", line 852, in job
for newjob in step.iterable:
File "/home/michael/cwltool/cwltool/workflow_job.py", line 771, in try_make_job
for j in jobs:
File "/home/michael/cwltool/cwltool/workflow_job.py", line 78, in job
for j in self.step.job(joborder, output_callback, runtimeContext):
File "cwltool/workflow.py", line 439, in job
for tool in self.embedded_tool.job(
File "cwltool/command_line_tool.py", line 788, in job
File "cwltool/process.py", line 952, in _init_job
if self.tool["class"] != "Workflow":
File "cwltool/process.py", line 990, in evalResources
Union[int, float],
File "cwltool/process.py", line 549, in eval_resource
if isinstance(resource_req, str) and expression.needs_parsing(resource_req):
File "cwltool/builder.py", line 639, in do_eval
return expression.do_eval(
File "cwltool/expression.py", line 402, in do_eval
raise WorkflowException("Expression evaluation error:\n%s" % str(e)) from e |
When I modify the example to have an input for the
|
FYI, the expected is
|
Original PullRequest common-workflow-language/cwltool#1566 Original Issue common-workflow-language/cwltool#1330
Original PullRequest common-workflow-language/cwltool#1566 Original Issue common-workflow-language/cwltool#1330
Here's a workaround that works for the example workflow above, with the downside that it is annoying to have to duplicate inputs. #!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: Workflow
hints:
ResourceRequirement:
coresMax: $(inputs.threads_max)
inputs:
threads_max:
type: int
default: 4
steps:
one:
in:
threads_max: threads_max
run:
class: CommandLineTool
inputs:
threads_max:
type: int
baseCommand: echo
arguments: [ $(runtime.cores) ]
outputs: []
out: []
outputs: [] |
@kinow Yep, but this is a major bug that the wrong inputs object is being used to evaluate expressions in workflow level hints/reqs |
Original PullRequest common-workflow-language/cwltool#1566 Original Issue common-workflow-language/cwltool#1330
Original PullRequest common-workflow-language/cwltool#1566 Original Issue common-workflow-language/cwltool#1330
Original PullRequest common-workflow-language/cwltool#1566 Original Issue common-workflow-language/cwltool#1330
Original PullRequest common-workflow-language/cwltool#1566 Original Issue common-workflow-language/cwltool#1330
The text was updated successfully, but these errors were encountered: