-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(sdk): ImporterSpec v2 #6917
Merged
Merged
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
bfbb0ef
importer
ji-yaqi ce14cde
Merge branch 'kubeflow:master' into importer_v2
ji-yaqi a51e09e
compiler
ji-yaqi d9e1838
Merge branch 'importer_v2' of github.com:ji-yaqi/pipelines into impor…
ji-yaqi 8808b51
check diff
ji-yaqi 80f09ef
fix format
ji-yaqi b7ab0a7
remove v1 node test
ji-yaqi 1006f40
remove importer v2 compat test
ji-yaqi 2eddaa6
release note
ji-yaqi 990ef57
address comments
ji-yaqi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: pipeline-flip-coin- | ||
annotations: {pipelines.kubeflow.org/kfp_sdk_version: 1.8.9, pipelines.kubeflow.org/pipeline_compilation_time: '2021-11-17T11:37:42.129215', | ||
pipelines.kubeflow.org/pipeline_spec: '{"description": "shows how to use dsl.Condition.", | ||
"name": "pipeline flip coin"}'} | ||
labels: {pipelines.kubeflow.org/kfp_sdk_version: 1.8.9} | ||
spec: | ||
entrypoint: pipeline-flip-coin | ||
templates: | ||
- name: condition-1 | ||
outputs: | ||
parameters: | ||
- name: flip-again-output | ||
valueFrom: {parameter: '{{tasks.flip-again.outputs.parameters.flip-again-output}}'} | ||
dag: | ||
tasks: | ||
- name: condition-2 | ||
template: condition-2 | ||
when: '"{{tasks.flip-again.outputs.parameters.flip-again-output}}" == "tails"' | ||
dependencies: [flip-again] | ||
arguments: | ||
parameters: | ||
- {name: flip-again-output, value: '{{tasks.flip-again.outputs.parameters.flip-again-output}}'} | ||
- {name: flip-again, template: flip-again} | ||
- name: condition-2 | ||
inputs: | ||
parameters: | ||
- {name: flip-again-output} | ||
dag: | ||
tasks: | ||
- name: print1 | ||
template: print1 | ||
arguments: | ||
parameters: | ||
- {name: flip-again-output, value: '{{inputs.parameters.flip-again-output}}'} | ||
- name: condition-3 | ||
inputs: | ||
parameters: | ||
- {name: flip-again-output} | ||
dag: | ||
tasks: | ||
- name: print2 | ||
template: print2 | ||
arguments: | ||
parameters: | ||
- {name: flip-again-output, value: '{{inputs.parameters.flip-again-output}}'} | ||
- name: flip | ||
container: | ||
args: ['python -c "import random; result = ''heads'' if random.randint(0,1) | ||
== 0 else ''tails''; print(result)" | tee /tmp/output'] | ||
command: [sh, -c] | ||
image: python:alpine3.6 | ||
outputs: | ||
parameters: | ||
- name: flip-output | ||
valueFrom: {path: /tmp/output} | ||
artifacts: | ||
- {name: flip-output, path: /tmp/output} | ||
metadata: | ||
labels: | ||
pipelines.kubeflow.org/kfp_sdk_version: 1.8.9 | ||
pipelines.kubeflow.org/pipeline-sdk-type: kfp | ||
pipelines.kubeflow.org/enable_caching: "true" | ||
- name: flip-again | ||
container: | ||
args: ['python -c "import random; result = ''heads'' if random.randint(0,1) | ||
== 0 else ''tails''; print(result)" | tee /tmp/output'] | ||
command: [sh, -c] | ||
image: python:alpine3.6 | ||
outputs: | ||
parameters: | ||
- name: flip-again-output | ||
valueFrom: {path: /tmp/output} | ||
artifacts: | ||
- {name: flip-again-output, path: /tmp/output} | ||
metadata: | ||
labels: | ||
pipelines.kubeflow.org/kfp_sdk_version: 1.8.9 | ||
pipelines.kubeflow.org/pipeline-sdk-type: kfp | ||
pipelines.kubeflow.org/enable_caching: "true" | ||
- name: pipeline-flip-coin | ||
dag: | ||
tasks: | ||
- name: condition-1 | ||
template: condition-1 | ||
when: '"{{tasks.flip.outputs.parameters.flip-output}}" == "heads"' | ||
dependencies: [flip] | ||
- name: condition-3 | ||
template: condition-3 | ||
when: '"{{tasks.flip.outputs.parameters.flip-output}}" == "tails"' | ||
dependencies: [condition-1, flip] | ||
arguments: | ||
parameters: | ||
- {name: flip-again-output, value: '{{tasks.condition-1.outputs.parameters.flip-again-output}}'} | ||
- {name: flip, template: flip} | ||
- name: print1 | ||
container: | ||
command: [echo, '{{inputs.parameters.flip-again-output}}'] | ||
image: alpine:3.6 | ||
inputs: | ||
parameters: | ||
- {name: flip-again-output} | ||
metadata: | ||
labels: | ||
pipelines.kubeflow.org/kfp_sdk_version: 1.8.9 | ||
pipelines.kubeflow.org/pipeline-sdk-type: kfp | ||
pipelines.kubeflow.org/enable_caching: "true" | ||
- name: print2 | ||
container: | ||
command: [echo, '{{inputs.parameters.flip-again-output}}'] | ||
image: alpine:3.6 | ||
inputs: | ||
parameters: | ||
- {name: flip-again-output} | ||
metadata: | ||
labels: | ||
pipelines.kubeflow.org/kfp_sdk_version: 1.8.9 | ||
pipelines.kubeflow.org/pipeline-sdk-type: kfp | ||
pipelines.kubeflow.org/enable_caching: "true" | ||
arguments: | ||
parameters: [] | ||
serviceAccountName: pipeline-runner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -907,17 +907,21 @@ def _build_spec_by_group( | |
task_name_to_component_spec[ | ||
subgroup.name] = subgroup_component_spec | ||
|
||
# TODO: handler importer spec. | ||
|
||
subgroup_container_spec = builder.build_container_spec_for_task( | ||
task=subgroup) | ||
|
||
executor_label = subgroup_component_spec.executor_label | ||
|
||
if executor_label not in deployment_config.executors: | ||
deployment_config.executors[ | ||
executor_label].container.CopyFrom( | ||
subgroup_container_spec) | ||
if hasattr(subgroup, 'container_spec'): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given that we document both |
||
subgroup_container_spec = builder.build_container_spec_for_task( | ||
task=subgroup) | ||
deployment_config.executors[ | ||
executor_label].container.CopyFrom( | ||
subgroup_container_spec) | ||
elif hasattr(subgroup, 'importer_spec'): | ||
subgroup_importer_spec = builder.build_importer_spec_for_task( | ||
task=subgroup) | ||
deployment_config.executors[ | ||
executor_label].importer.CopyFrom( | ||
subgroup_importer_spec) | ||
|
||
elif isinstance(subgroup, dsl.ParallelFor): | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert this file?