Skip to content
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

inputs: fix typo in steering_ctx kwargs #45

Conversation

diegodelemos
Copy link
Member

@diegodelemos
Copy link
Member Author

diegodelemos commented Jan 11, 2018

In order to use input files with yadage the filenames should be passed as arguments i.e.:

For the given workflow:

stages:
  - name: hello_world
    dependencies: ['init']
    scheduler:
      scheduler_type: singlestep-stage
      parameters:
        outputfile: '{workdir}/hello_world.txt'
        # Add the inputfile parameter to the worklfow spec.
        inputfile: {stages: init, output: inputfile, unwrap: true})
      step:
        process:
          process_type: 'string-interpolated-cmd'
          cmd: 'cat {inputfile} > {outputfile}'
        publisher:
          publisher_type: 'frompar-pub'
          outputmap:
            outputfile: outputfile
        environment:
          environment_type: 'docker-encapsulated'
          image: busybox

So before starting it, we should provide {'inputfile': 'input.txt'} as a workflow parameter apart from seeding it (reana-client inputs upload input.txt --workflow mega-workflow).

⚠️ In yadage 0.12.13 it is yadage.utils.discover_initfiles who takes care of resolving input files path. Remember that the fact that we are using a shared volume and the same base path allows this feature to work meaning that: the path gets resolved in the workflow-engine file system which for /data happens to be the same both in workflow-engine and job container (see job-controller mount_path and storage_paths and workflow-engine mount path and storage path).

@diegodelemos diegodelemos force-pushed the 38-read-inputs-from-canonical-location branch from 16b050e to a13d721 Compare January 11, 2018 10:48
@diegodelemos diegodelemos merged commit a13d721 into reanahub:master Jan 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants