-
Notifications
You must be signed in to change notification settings - Fork 122
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
Investigate different ways to pass parameters between tasks #41
Comments
Issue-Label Bot is automatically applying the labels:
Please mark this comment with 👍 or 👎 to give our bot feedback! |
/p1 |
FYI, linking to PR #27 which introduced the limited PR #27 made this scenario work, where the path of the output ( def gcs_download_op(url):
return dsl.ContainerOp(
name='GCS - Download',
image='google/cloud-sdk:279.0.0',
command=['sh', '-c'],
arguments=['gsutil cat $0 | tee $1', url, '/tmp/results.txt'], # 2: output file path
file_outputs={
'data': '/tmp/results.txt', # 1: output parameter mapped to file path
}
) which the KFP-Tekton compiler replaces with the expression spec:
params:
- name: url1
results:
- name: data # 1: result parameter definition
description: /tmp/results.txt
steps:
- name: gcs-download
image: google/cloud-sdk:279.0.0
command: ['sh', '-c']
args:
- gsutil cat $0 | tee $1
- $(inputs.params.url1)
- $(results.data.path) # 2: replaced file path with result parameter expression However, if the output file location is dynamically provided as a input parameter or is simply known by the developer and does not show up in clear text, then the above logic fails: def TrainOp(name, input_dir, output_dir, model_name, model_version, epochs):
return dsl.ContainerOp(
name=name,
image='<train-image>',
arguments=[ # 2: there are no output file path to replace with Tekton variable expression
'--input_dir', input_dir,
'--output_dir', output_dir,
'--model_name', model_name,
'--model_version', model_version,
'--epochs', epochs
],
file_outputs={'output': '/output.txt'} # 1: output parameter mapped to file path
) |
initial proposal, adding an extra step to copy file to |
update: passing file between steps will still require either volumemount or workspaces. |
init poc branch: https://github.com/Tomcli/kfp-tekton/tree/copy_param |
right now we don't have code-gen for pipelinerun. So creating workspaces will require users to manually define their workspace volumes. Should we propose to also generate pipelinerun as part of our yaml? |
@afrittoli -- can you clarify if we really need a |
/kind discussion |
Added initial approach to copy the files with an extra step. @afrittoli let me know if you could think of a better way to pass parameters in any path. |
For sharing between steps you can mount an |
As long as you're within the boundaries of a Task, you don't need a |
As a side not, I feel that allowing absolute paths into the KFP DSL is a leak of a lower level detail into the DSL abstraction, but I guess it might be too late to change that? |
Currently, we are using the task.results for passing parameter outputs. This has a limitation where the output parameter files have to be under
/tekton/results
. However, some of the Kubeflow pipeline has no configuration for the output file path (e.g. The current Watson ML example). Therefore, we need to figure out an alternative way that can take output parameter files from any path in the container.The text was updated successfully, but these errors were encountered: