-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Clarify evaluation policy of Workflow level requirements #157
Comments
I think your are correct about But I am not sure if there won't be cases where an implementation may prefer a lazy evaluation (e.g. maybe a case where an implementation wants to call a service to dynamically compute resources? like a batch scheduler?). Perhaps the specification should say instead that it is up to the implementers to decide whether to do lazy or eager evaluation of resources, but suggest for implementers to clarify in their documentation what was decided. So in this case we could document in For |
I understand there are use cases for both of eager and lazy evaluations in the process requirements. However, as a long term solution, I against to add "eager" and "lazy" evaluations to the spec because we already have the specification for similar use cases: Unfortunately the current spec does not support the use cases because:
How about extending the spec of
In this proposal, we only need eager evaluations and therefore it is easier to understand the spec and also easier to implement the platforms. class: Workflow
inputs:
ncores: int
steps:
step1:
run: tool.cwl
in:
mem:
default: 1024 # 1GB
requirements:
ResourceRequirement:
coresMin: $(inputs.ncores) # refer the parent input object with `inputs`
ramMin: $(self.mem) # refer the child input object with `self`
... Note:
|
@tetron proposes deferring this to CWL v1.3, and adding an upgrader to copy down any dynamic requirements/hints to each workflow step, for evaluation in that context. For CWL v1.2.1, he proposes documenting the existing behavior. We should see if there are existing conformance test that touch on the "old" way |
The CWL standard says
Such sentence is a bit ambiguous, in that it does not specify if the evaluation is eager (at the Workflow level) or lazy (at the inner step level). For ResourceRequirements, cwlltool (and StreamFlow, too) adopts a lazy evaluation policy, so that expressions are evaluated at the CommandLineTool level. This can generate unexpected behaviours with unconnected inputs, as reported in #1330.
The sentence should then be clarified, establishing the desired evaluation policy for this kind of requirements.
The text was updated successfully, but these errors were encountered: