Skip to content

Commit 5ec5a0b

Browse files
committed
regenerate compiled workflows
Signed-off-by: Humair Khan <[email protected]>
1 parent 25484fc commit 5ec5a0b

File tree

2 files changed

+70
-23
lines changed

2 files changed

+70
-23
lines changed

test_data/compiled-workflows/pipeline_with_artifact_custom_path.yaml

Lines changed: 66 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,47 @@ apiVersion: argoproj.io/v1alpha1
22
kind: Workflow
33
metadata:
44
creationTimestamp: null
5-
generateName: pipeline-with-semaphore-
5+
generateName: pipeline-with-custom-path-artifact-
66
spec:
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:
@@ -34,7 +56,7 @@ spec:
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

test_data/compiled-workflows/pipeline_with_string_machine_fields_task_output.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ spec:
7272
kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import *\n\ndef
7373
sum_numbers(a: int, b: int) -\u003e int:\n return a + b\n\n"],"image":"python:3.11","resources":{"accelerator":{"resourceCount":"{{$.inputs.parameters[''pipelinechannel--accelerator-limit-Output'']}}","resourceType":"{{$.inputs.parameters[''pipelinechannel--accelerator-type-Output'']}}"},"resourceCpuLimit":"{{$.inputs.parameters[''pipelinechannel--cpu-limit-Output'']}}","resourceMemoryLimit":"{{$.inputs.parameters[''pipelinechannel--memory-limit-Output'']}}"}}'
7474
- name: components-root
75-
value: '{"dag":{"tasks":{"accelerator-limit":{"cachingOptions":{"enableCache":true},"componentRef":{"name":"comp-accelerator-limit"},"taskInfo":{"name":"accelerator-limit"}},"accelerator-type":{"cachingOptions":{"enableCache":true},"componentRef":{"name":"comp-accelerator-type"},"taskInfo":{"name":"accelerator-type"}},"cpu-limit":{"cachingOptions":{"enableCache":true},"componentRef":{"name":"comp-cpu-limit"},"taskInfo":{"name":"cpu-limit"}},"memory-limit":{"cachingOptions":{"enableCache":true},"componentRef":{"name":"comp-memory-limit"},"taskInfo":{"name":"memory-limit"}},"sum-numbers":{"cachingOptions":{"enableCache":true},"componentRef":{"name":"comp-sum-numbers"},"dependentTasks":["accelerator-limit","accelerator-type","memory-limit","cpu-limit"],"inputs":{"parameters":{"a":{"runtimeValue":{"constant":1}},"accelerator_count":{"runtimeValue":{"constant":"{{$.inputs.parameters[''pipelinechannel--accelerator-limit-Output'']}}"}},"accelerator_type":{"runtimeValue":{"constant":"{{$.inputs.parameters[''pipelinechannel--accelerator-type-Output'']}}"}},"b":{"runtimeValue":{"constant":2}},"cpu_limit":{"runtimeValue":{"constant":"{{$.inputs.parameters[''pipelinechannel--cpu-limit-Output'']}}"}},"memory_limit":{"runtimeValue":{"constant":"{{$.inputs.parameters[''pipelinechannel--memory-limit-Output'']}}"}},"pipelinechannel--accelerator-limit-Output":{"taskOutputParameter":{"outputParameterKey":"Output","producerTask":"accelerator-limit"}},"pipelinechannel--accelerator-type-Output":{"taskOutputParameter":{"outputParameterKey":"Output","producerTask":"accelerator-type"}},"pipelinechannel--cpu-limit-Output":{"taskOutputParameter":{"outputParameterKey":"Output","producerTask":"cpu-limit"}},"pipelinechannel--memory-limit-Output":{"taskOutputParameter":{"outputParameterKey":"Output","producerTask":"memory-limit"}}}},"taskInfo":{"name":"sum-numbers"}}}}}'
75+
value: '{"dag":{"tasks":{"accelerator-limit":{"cachingOptions":{"enableCache":true},"componentRef":{"name":"comp-accelerator-limit"},"taskInfo":{"name":"accelerator-limit"}},"accelerator-type":{"cachingOptions":{"enableCache":true},"componentRef":{"name":"comp-accelerator-type"},"taskInfo":{"name":"accelerator-type"}},"cpu-limit":{"cachingOptions":{"enableCache":true},"componentRef":{"name":"comp-cpu-limit"},"taskInfo":{"name":"cpu-limit"}},"memory-limit":{"cachingOptions":{"enableCache":true},"componentRef":{"name":"comp-memory-limit"},"taskInfo":{"name":"memory-limit"}},"sum-numbers":{"cachingOptions":{"enableCache":true},"componentRef":{"name":"comp-sum-numbers"},"dependentTasks":["accelerator-limit","accelerator-type","cpu-limit","memory-limit"],"inputs":{"parameters":{"a":{"runtimeValue":{"constant":1}},"accelerator_count":{"runtimeValue":{"constant":"{{$.inputs.parameters[''pipelinechannel--accelerator-limit-Output'']}}"}},"accelerator_type":{"runtimeValue":{"constant":"{{$.inputs.parameters[''pipelinechannel--accelerator-type-Output'']}}"}},"b":{"runtimeValue":{"constant":2}},"cpu_limit":{"runtimeValue":{"constant":"{{$.inputs.parameters[''pipelinechannel--cpu-limit-Output'']}}"}},"memory_limit":{"runtimeValue":{"constant":"{{$.inputs.parameters[''pipelinechannel--memory-limit-Output'']}}"}},"pipelinechannel--accelerator-limit-Output":{"taskOutputParameter":{"outputParameterKey":"Output","producerTask":"accelerator-limit"}},"pipelinechannel--accelerator-type-Output":{"taskOutputParameter":{"outputParameterKey":"Output","producerTask":"accelerator-type"}},"pipelinechannel--cpu-limit-Output":{"taskOutputParameter":{"outputParameterKey":"Output","producerTask":"cpu-limit"}},"pipelinechannel--memory-limit-Output":{"taskOutputParameter":{"outputParameterKey":"Output","producerTask":"memory-limit"}}}},"taskInfo":{"name":"sum-numbers"}}}}}'
7676
entrypoint: entrypoint
7777
podMetadata:
7878
annotations:
@@ -390,15 +390,15 @@ spec:
390390
- name: component
391391
value: '{{workflow.parameters.components-49f9a898b718a077f30b7fd8c02d39767cff91ff0bbda4379daf866a91dbdb1b}}'
392392
- name: task
393-
value: '{"cachingOptions":{"enableCache":true},"componentRef":{"name":"comp-sum-numbers"},"dependentTasks":["accelerator-limit","accelerator-type","memory-limit","cpu-limit"],"inputs":{"parameters":{"a":{"runtimeValue":{"constant":1}},"accelerator_count":{"runtimeValue":{"constant":"{{$.inputs.parameters[''pipelinechannel--accelerator-limit-Output'']}}"}},"accelerator_type":{"runtimeValue":{"constant":"{{$.inputs.parameters[''pipelinechannel--accelerator-type-Output'']}}"}},"b":{"runtimeValue":{"constant":2}},"cpu_limit":{"runtimeValue":{"constant":"{{$.inputs.parameters[''pipelinechannel--cpu-limit-Output'']}}"}},"memory_limit":{"runtimeValue":{"constant":"{{$.inputs.parameters[''pipelinechannel--memory-limit-Output'']}}"}},"pipelinechannel--accelerator-limit-Output":{"taskOutputParameter":{"outputParameterKey":"Output","producerTask":"accelerator-limit"}},"pipelinechannel--accelerator-type-Output":{"taskOutputParameter":{"outputParameterKey":"Output","producerTask":"accelerator-type"}},"pipelinechannel--cpu-limit-Output":{"taskOutputParameter":{"outputParameterKey":"Output","producerTask":"cpu-limit"}},"pipelinechannel--memory-limit-Output":{"taskOutputParameter":{"outputParameterKey":"Output","producerTask":"memory-limit"}}}},"taskInfo":{"name":"sum-numbers"}}'
393+
value: '{"cachingOptions":{"enableCache":true},"componentRef":{"name":"comp-sum-numbers"},"dependentTasks":["accelerator-limit","accelerator-type","cpu-limit","memory-limit"],"inputs":{"parameters":{"a":{"runtimeValue":{"constant":1}},"accelerator_count":{"runtimeValue":{"constant":"{{$.inputs.parameters[''pipelinechannel--accelerator-limit-Output'']}}"}},"accelerator_type":{"runtimeValue":{"constant":"{{$.inputs.parameters[''pipelinechannel--accelerator-type-Output'']}}"}},"b":{"runtimeValue":{"constant":2}},"cpu_limit":{"runtimeValue":{"constant":"{{$.inputs.parameters[''pipelinechannel--cpu-limit-Output'']}}"}},"memory_limit":{"runtimeValue":{"constant":"{{$.inputs.parameters[''pipelinechannel--memory-limit-Output'']}}"}},"pipelinechannel--accelerator-limit-Output":{"taskOutputParameter":{"outputParameterKey":"Output","producerTask":"accelerator-limit"}},"pipelinechannel--accelerator-type-Output":{"taskOutputParameter":{"outputParameterKey":"Output","producerTask":"accelerator-type"}},"pipelinechannel--cpu-limit-Output":{"taskOutputParameter":{"outputParameterKey":"Output","producerTask":"cpu-limit"}},"pipelinechannel--memory-limit-Output":{"taskOutputParameter":{"outputParameterKey":"Output","producerTask":"memory-limit"}}}},"taskInfo":{"name":"sum-numbers"}}'
394394
- name: container
395395
value: '{{workflow.parameters.implementations-49f9a898b718a077f30b7fd8c02d39767cff91ff0bbda4379daf866a91dbdb1b}}'
396396
- name: task-name
397397
value: sum-numbers
398398
- name: parent-dag-task-id
399399
value: '{{inputs.parameters.parent-dag-task-id}}'
400-
depends: accelerator-limit.Succeeded && accelerator-type.Succeeded && memory-limit.Succeeded
401-
&& cpu-limit.Succeeded
400+
depends: accelerator-limit.Succeeded && accelerator-type.Succeeded && cpu-limit.Succeeded
401+
&& memory-limit.Succeeded
402402
name: sum-numbers-driver
403403
template: system-container-driver
404404
- arguments:

0 commit comments

Comments
 (0)