Skip to content

Commit

Permalink
fix(sdk): update v2 yaml format (#6661)
Browse files Browse the repository at this point in the history
* fix(sdk): change names to input_name and output_name

* ordered dict and schema version numbering

* Remove schema_version, annotatations and labels

* change container/dagspec format

* change to bracket

* fix tests

* fix py3.6 forwardref issue

* fix ordered dict

* address comments

* release notes + test

* address comments
  • Loading branch information
ji-yaqi authored Oct 7, 2021
1 parent 89e4c1c commit 5892bf9
Show file tree
Hide file tree
Showing 5 changed files with 309 additions and 348 deletions.
1 change: 1 addition & 0 deletions sdk/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* Fix executor getting None as value when float 0 is passed in. [\#6682](https://github.com/kubeflow/pipelines/pull/6682)
* Fix function-based components not preserving the namespace of GCPC artifact types. [\#6702](https://github.com/kubeflow/pipelines/pull/6702)
* Depends on `typing-extensions>=3.7.4,<4; python_version<"3.9"` [\#6683](https://github.com/kubeflow/pipelines/pull/6683)
* Update v2 yaml format [\#6661](https://github.com/kubeflow/pipelines/pull/6661)

## Documentation Updates

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,17 @@ def execute(self, *args, **kwargs):
component_op = TestComponent(
component_spec=component_spec.ComponentSpec(
name='component_1',
implementation=component_spec.ContainerSpec(
implementation=component_spec.Implementation(
container=component_spec.ContainerSpec(
image='alpine',
commands=[
'sh',
'-c',
'set -ex\necho "$0" > "$1"',
component_spec.InputValuePlaceholder(input_value='input1'),
component_spec.OutputPathPlaceholder(output_path='output1'),
component_spec.InputValuePlaceholder(input_name='input1'),
component_spec.OutputPathPlaceholder(output_name='output1'),
],
),
)),
inputs={'input1': component_spec.InputSpec(type='String')},
outputs={'output1': component_spec.OutputSpec(type='String')},
))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ def execute(self, *args, **kwargs):
'sh',
'-c',
'set -ex\necho "$0" "$1" "$2" > "$3"',
component_spec.InputValuePlaceholder(input_value='input1'),
component_spec.InputValuePlaceholder(input_value='input2'),
component_spec.InputValuePlaceholder(input_value='input3'),
component_spec.OutputPathPlaceholder(output_path='output1'),
component_spec.InputValuePlaceholder(input_name='input1'),
component_spec.InputValuePlaceholder(input_name='input2'),
component_spec.InputValuePlaceholder(input_name='input3'),
component_spec.OutputPathPlaceholder(output_name='output1'),
],
),
inputs={
Expand Down
Loading

0 comments on commit 5892bf9

Please sign in to comment.