Passing a file as an output path
@sergey-serebryakov is already working on this.
Since Sep 15, 2021.
- Dominant language
- Python
- Stars
- 160
- Forks
- 31
- PR merge metrics
- No merged PRs in 30d
Description
Right now it is not possible to pass a file as output parameter to a task if that file doesn't exist already.
In this cases, the only solution I've found was to specify the path where the file should exist as the output parameter like so
mlcube.yaml
tasks:
infer:
parameters:
inputs: {parameters_file: parameters.yaml
outputs: {out_dir: ./}
And inside the parameters.yaml provide the name of the file to be created
parameters.yaml
out_file: inferences.yaml
This can be problematic, as the parameters.yaml file is cube-specific, and there's no easy way to know which key is being used to point to the output file of interest.
MedPerf needs to unwind the location of some output files in order to execute operations like dataset registration, and this requires the assumption that the output file for a given cube will use a determined key inside the parameters.yaml
Additionally, from a user perspective, being able to point to files directly in the input parameters but not in the outputs makes it confusing.
A good solution would be to identify if the user is trying to point to a non-existent file as an output and if that's the case create the file prior to running the cube.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.