@@ -2,25 +2,47 @@ apiVersion: argoproj.io/v1alpha1
22kind : Workflow
33metadata :
44 creationTimestamp : null
5- generateName : pipeline-with-semaphore -
5+ generateName : pipeline-with-custom-path-artifact -
66spec :
77 arguments :
88 parameters :
9- - name : components-8c43378018a8d9ed1a17d6cd02a579db5fa506abf47189a0385306301b7fa2c2
10- value : ' {"executorLabel":"exec-comp" }'
11- - name : implementations-8c43378018a8d9ed1a17d6cd02a579db5fa506abf47189a0385306301b7fa2c2
12- value : ' {"args":["--executor_input","{{$}}","--function_to_execute","comp "],"command":["sh","-c","\nif
9+ - name : components-0692d431e617fbe942c422f90e6bc3e379106797bac2421b5f1889953b36c4bd
10+ value : ' {"executorLabel":"exec-component-output-artifact","outputDefinitions":{"artifacts":{"out_dataset":{"artifactType":{"schemaTitle":"system.Dataset","schemaVersion":"0.0.1"}}}} }'
11+ - name : implementations-0692d431e617fbe942c422f90e6bc3e379106797bac2421b5f1889953b36c4bd
12+ value : ' {"args":["--executor_input","{{$}}","--function_to_execute","component_output_artifact "],"command":["sh","-c","\nif
1313 ! [ -x \"$(command -v pip)\" ]; then\n python3 -m ensurepip || python3
1414 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1
15- python3 -m pip install --quiet --no-warn-script-location '' kfp==2.14.3 '' '' --no-deps''
15+ python3 -m pip install --quiet --no-warn-script-location '' kfp==2.14.6 '' '' --no-deps''
1616 '' typing-extensions\u003e=3.7.4,\u003c5; python_version\u003c\"3.9\"'' \u0026\u0026
1717 \"$0\" \"$@\"\n","sh","-ec","program_path=$(mktemp -d)\n\nprintf \"%s\" \"$0\"
1818 \u003e \"$program_path/ephemeral_component.py\"\n_KFP_RUNTIME=true python3
1919 -m kfp.dsl.executor_main --component_module_path \"$program_path/ephemeral_component.py\" \"$@\"\n","\nimport
2020 kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import *\n\ndef
21- comp():\n pass\n\n"],"image":"python:3.11"}'
21+ component_output_artifact(out_dataset: Output[Dataset]):\n out_dataset.set_path('' /tmp/out_dataset'' )\n\n with
22+ open(out_dataset.path, '' w'' ) as f:\n f.write('' Hello, World!'' )\n\n if
23+ out_dataset.path != '' /tmp/out_dataset'' :\n raise ValueError(f\"File
24+ path is {out_dataset.path} but should be '' /tmp/out_dataset'' .\")\n if
25+ out_dataset.custom_path != '' /tmp/out_dataset'' :\n raise ValueError(f\"File
26+ uri is {out_dataset.custom_path} but should be '' /tmp/out_dataset'' .\")\n\n"],"image":"python:3.11"}'
27+ - name : components-0641839dce68d0225ee497406363513592d841c856891f7313f5368a99e8a50d
28+ value : ' {"executorLabel":"exec-validate-input-artifact","inputDefinitions":{"artifacts":{"in_dataset":{"artifactType":{"schemaTitle":"system.Dataset","schemaVersion":"0.0.1"}}}},"outputDefinitions":{"parameters":{"Output":{"parameterType":"BOOLEAN"}}}}'
29+ - name : implementations-0641839dce68d0225ee497406363513592d841c856891f7313f5368a99e8a50d
30+ value : ' {"args":["--executor_input","{{$}}","--function_to_execute","validate_input_artifact"],"command":["sh","-c","\nif
31+ ! [ -x \"$(command -v pip)\" ]; then\n python3 -m ensurepip || python3
32+ -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1
33+ python3 -m pip install --quiet --no-warn-script-location '' kfp==2.14.6'' '' --no-deps''
34+ '' typing-extensions\u003e=3.7.4,\u003c5; python_version\u003c\"3.9\"'' \u0026\u0026
35+ \"$0\" \"$@\"\n","sh","-ec","program_path=$(mktemp -d)\n\nprintf \"%s\" \"$0\"
36+ \u003e \"$program_path/ephemeral_component.py\"\n_KFP_RUNTIME=true python3
37+ -m kfp.dsl.executor_main --component_module_path \"$program_path/ephemeral_component.py\" \"$@\"\n","\nimport
38+ kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import *\n\ndef
39+ validate_input_artifact(in_dataset: Input[Dataset]) -\u003e bool:\n if
40+ in_dataset is None:\n raise ValueError(\"Input artifact is None.\")\n with
41+ open(in_dataset.path, '' r'' ) as f:\n for line in f:\n if
42+ line != '' Hello, World!'' :\n raise ValueError(f\"File content
43+ is {line} but should be '' Hello, World!'' .\")\n return True\n\n"],"image":"python:3.11"}'
2244 - name : components-root
23- value : ' {"dag":{"tasks":{"comp" :{"cachingOptions":{"enableCache":true},"componentRef":{"name":"comp-comp "},"taskInfo":{"name":"comp "}}}}}'
45+ value : ' {"dag":{"tasks":{"component-output-artifact":{"cachingOptions":{},"componentRef":{"name":" comp-component-output-artifact"},"taskInfo" :{"name":"component-output-artifact"}},"validate-input-artifact":{" cachingOptions":{"enableCache":true},"componentRef":{"name":"comp-validate-input-artifact "},"dependentTasks":["component-output-artifact"],"inputs":{"artifacts":{"in_dataset":{"taskOutputArtifact":{"outputArtifactKey":"out_dataset","producerTask":"component-output-artifact"}}}}," taskInfo":{"name":"validate-input-artifact "}}}}}'
2446 entrypoint : entrypoint
2547 podMetadata :
2648 annotations :
3456 - --type
3557 - CONTAINER
3658 - --pipeline_name
37- - pipeline-with-semaphore
59+ - pipeline-with-custom-path-artifact
3860 - --run_id
3961 - ' {{workflow.uid}}'
4062 - --run_name
@@ -240,26 +262,51 @@ spec:
240262 - arguments :
241263 parameters :
242264 - name : component
243- value : ' {{workflow.parameters.components-8c43378018a8d9ed1a17d6cd02a579db5fa506abf47189a0385306301b7fa2c2}}'
265+ value : ' {{workflow.parameters.components-0692d431e617fbe942c422f90e6bc3e379106797bac2421b5f1889953b36c4bd}}'
266+ - name : task
267+ value : ' {"cachingOptions":{},"componentRef":{"name":"comp-component-output-artifact"},"taskInfo":{"name":"component-output-artifact"}}'
268+ - name : container
269+ value : ' {{workflow.parameters.implementations-0692d431e617fbe942c422f90e6bc3e379106797bac2421b5f1889953b36c4bd}}'
270+ - name : task-name
271+ value : component-output-artifact
272+ - name : parent-dag-task-id
273+ value : ' {{inputs.parameters.parent-dag-task-id}}'
274+ name : component-output-artifact-driver
275+ template : system-container-driver
276+ - arguments :
277+ parameters :
278+ - name : pod-spec-patch
279+ value : ' {{tasks.component-output-artifact-driver.outputs.parameters.pod-spec-patch}}'
280+ - default : " false"
281+ name : cached-decision
282+ value : ' {{tasks.component-output-artifact-driver.outputs.parameters.cached-decision}}'
283+ depends : component-output-artifact-driver.Succeeded
284+ name : component-output-artifact
285+ template : system-container-executor
286+ - arguments :
287+ parameters :
288+ - name : component
289+ value : ' {{workflow.parameters.components-0641839dce68d0225ee497406363513592d841c856891f7313f5368a99e8a50d}}'
244290 - name : task
245- value : ' {"cachingOptions":{"enableCache":true},"componentRef":{"name":"comp-comp "},"taskInfo":{"name":"comp "}}'
291+ value : ' {"cachingOptions":{"enableCache":true},"componentRef":{"name":"comp-validate-input-artifact "},"dependentTasks":["component-output-artifact"],"inputs":{"artifacts":{"in_dataset":{"taskOutputArtifact":{"outputArtifactKey":"out_dataset","producerTask":"component-output-artifact"}}}}," taskInfo":{"name":"validate-input-artifact "}}'
246292 - name : container
247- value : ' {{workflow.parameters.implementations-8c43378018a8d9ed1a17d6cd02a579db5fa506abf47189a0385306301b7fa2c2 }}'
293+ value : ' {{workflow.parameters.implementations-0641839dce68d0225ee497406363513592d841c856891f7313f5368a99e8a50d }}'
248294 - name : task-name
249- value : comp
295+ value : validate-input-artifact
250296 - name : parent-dag-task-id
251297 value : ' {{inputs.parameters.parent-dag-task-id}}'
252- name : comp-driver
298+ depends : component-output-artifact.Succeeded
299+ name : validate-input-artifact-driver
253300 template : system-container-driver
254301 - arguments :
255302 parameters :
256303 - name : pod-spec-patch
257- value : ' {{tasks.comp -driver.outputs.parameters.pod-spec-patch}}'
304+ value : ' {{tasks.validate-input-artifact -driver.outputs.parameters.pod-spec-patch}}'
258305 - default : " false"
259306 name : cached-decision
260- value : ' {{tasks.comp -driver.outputs.parameters.cached-decision}}'
261- depends : comp -driver.Succeeded
262- name : comp
307+ value : ' {{tasks.validate-input-artifact -driver.outputs.parameters.cached-decision}}'
308+ depends : validate-input-artifact -driver.Succeeded
309+ name : validate-input-artifact
263310 template : system-container-executor
264311 inputs :
265312 parameters :
@@ -272,7 +319,7 @@ spec:
272319 - --type
273320 - ' {{inputs.parameters.driver-type}}'
274321 - --pipeline_name
275- - pipeline-with-semaphore
322+ - pipeline-with-custom-path-artifact
276323 - --run_id
277324 - ' {{workflow.uid}}'
278325 - --run_name
0 commit comments