-
Notifications
You must be signed in to change notification settings - Fork 54
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
reana.yaml: parameter array read from file #305
reana.yaml: parameter array read from file #305
Comments
Both CWL and Yadage can have inputs specified as separate files. Example for CWL: $ cat reana.yaml
inputs:
parameters:
input: workflow/input.yml
workflow:
type: cwl
file: workflow/workflow.cwl
$ cat workflow/input.yml
library:
class: File
path: src/PhysicsObjectsHistos.cc
build_file:
class: File
path: BuildFile.xml
validation_script:
class: File
path: demoanalyzer_cfg.py So you could use this technique, create a big
Can you try to create a vanilla P.S. See e.g. |
Simple example of Yadage containing
can be found here. Workflow runs with yadage-run workdir workflow.yaml input.yaml where the input is read from |
In yadage it seems like initdata is a json with key-value pairs of 'parameter name'-'parameter value'. It is set in two ways, by
In REANA
i.e. currently It also seems like Hence we can not just create an
|
Regarding user interface, we should introduce a new option Regarding implementation, the r-w-e-yadage would have to do something like the following to merge the input file parameters and command-line parameters: from yadage.utils import getinit_data
initdata = getinit_data(initfiles, parameter) in order to pass the resulting merged initdata to the yadage steering. (See Yadage sources.) |
Both CWL and Yadage provide a “scatter-gather” paradigm. The workflow takes the input as an array and runs the specified steps on each element of the array as if it were a single input (Yadage allows for wanted batch size if specified).
The array can be declared in reana.yaml under
inputs: parameters:
like in the example from the Awesome Workshop.Currently the parameter array has to be declared explicitly by writing each element of the array down as a new line in the reana.yaml.
This is okey when you have 2-10 entries, however not realistic to enter 1500 entries as may be the case (example; names of data set files).
To be added:
Allow to specify a file to read the entries from. Each line in the file would be taken as an entry to the array.
Instead of adding 1500 lines to the reana.yaml those lines could be read from
index.txt
. The parameter arraycross_sections
would then be provided to CWL or Yadage which would use it as an input for their “scatter-gather” paradigm.The text was updated successfully, but these errors were encountered: