Commit Graph

17 Commits

Author SHA1 Message Date
Connor McCarthy 13736b85b6
chore(sdk): clean up kfp code style (#8027)
* remove unused imports

* use google as isort profile

* sort imports

* format with yapf

* clean end of file new line, trailing whitespace, double quoted strings
2022-07-15 00:06:34 +00:00
Yaqi Ji b693909a08
feat(sdk)!: move v1 to deprecated folder (#7291)
* chore(sdk): move v1 to deprecated

* fix testsg

* fix testsg

* fix setup.py

* fix test

* s'

* fix tests

* fix test

* retore v2 test changes

* fix py3.6 test

* fix py3.6 test

* fix py3.6 import fallback error

* remove deprecated

* fix samples test

* sample test

* fix samples

* add readme

* restroe test

* python require

* remove path

* fix tests

* inteegration tests

* remove tfx tests for dependency with kfp v1

* fix e2e

* fix e2e

* fix integration tests

* fix sampe

* move client down

* change to kfp

* add import alias

* fix

* runid

* fix dsl

* only use kfp for function

* revert train_until_good

* tfx test

* kfp

* try import

* onprem
2022-03-04 00:52:59 +00:00
Chen Sun 2f19a26ffd
chore(sdk): Format all Python files under SDK folder. (#6501)
* Reformat sdk only using the new yapf config.

* Reformat docstrings using docformatter.

* update golden files to resolve diff caused by whitespaces

* fix some tests

* format .py files under sdk/python/tests using yapf

* additional docformatter

* fix some tests
2021-09-03 11:25:11 -07:00
Chen Sun b200e1bc7d
fix(sdk): Fix URI placeholder in v2 compatible mode. (#6040)
* fix uri placeholder in v2 compatible mode

* fix tests

* fix path generation

* fix tests

* fix test

* cleanup

* clean up

* fix test

* fix test

* fix test
2021-07-21 08:32:50 -07:00
Alexey Volkov cc83e1089b
Assigned copyright to the project authors (#5587) 2021-05-05 13:53:22 +08:00
Alexey Volkov ba3a92f6d0
chore(sdk): Refactored command-line resolving (#5379)
* SDK - Refactored command-line resolving

Moved the execution engine specific code to the component bridge.

* Added placeholder_resolver

This simplifies adding custom placeholder resolving logic.
2021-04-09 13:44:03 -07:00
Asei Sugiyama d8028c5d9e
Fix(sdk): Enable FutureWarning with PipelineParam. Fix #5280 (#5299)
* init

* Update type annotation.

Arguments can be String, Integer, Float, Bool and PipelineParam passed from pipeline.

* Fix type annotation consistently.

* Add unit test.

* Fix unit test case.

* Fix after review, simplify by converting arguments and command to lists of str.
2021-03-30 02:56:17 -07:00
Abhishek Vilas Munagekar c52a81c1af
fix(sdk): fixes dsl.ContainerOp deprecation warning not shown (#4658)
* change dsl.ContainerOp warning to FutureWarning

* fix tests
2020-10-23 18:07:01 -07:00
Michalina Kotwica 0b3187966e
fix(sdk): Allow non-pythonic names for graph components' task's outputs. Fixes #4514. (#4515)
* add tests for pythonic and non-pythonic component outputs

* fix: graph for non-pythonic container output's names

Loading container component from component.yaml creates both
pythonic and original output names. Graph component iterated over
all outputs, using pythonic-to-output conversion on all. If some
of the names are not identical to their pythonic versions, they
rised KeyError on the lookup table.

This commit fixes this problem by using default value for the lookup.

* remove depythonification of outputs - not needed anymore
2020-09-28 20:53:25 -07:00
Alexey Volkov 03325848fc
feat(sdk): Components - Prevent passing unserializable objects to components. Fixes #4040 (#4496) 2020-09-16 02:23:22 -07:00
Alexey Volkov 2f9482758b
feat(sdk): SDK - Deprecation warning when using ContainerOp (#4166)
* SDK - Added warning when not using components

We have long advised our users to create reusable components.
Creating reusable components is as easy as creating ContainerOp instances, but the components are shareable, portable and are easier to support going forward.

* Disable warning for TFX

* Fixed the warning disabling logic

* Added tests
2020-07-08 23:16:53 -07:00
Alexey Volkov d707b93fb4
feat(sdk): DSL - Added support for volatile components (#4104)
Volatile components do not reuse the cached results by default.
The pipeline authors can re-enable cache reuse if they want.
2020-07-06 18:09:57 -07:00
Alexey Volkov 8ba366b03f
SDK - Made outputs with original names available in ContainerOp.outputs (#3734)
* SDK - Made outputs with original names available in ContainerOp.outputs

Previously, ContainerOp had strict requirements for the output names, so we had to convert all the names before passing them to the ContainerOp constructor. Outputs with non-pythonic names could not be accessed using their original names.
Now ContainerOp supports any output names, so we're now using the original output names.
However to support legacy pipelines, we're also adding output references with pythonic names.

* Fixed the compiler test data

* Fixed the duplicate parameter outputs in the compiled workflow

* Fixed long line

* Stabilized the output naming conflict resolution

* Fix case of missing special outputs
2020-05-12 19:08:26 -07:00
Alexey Volkov 7ee500f702
SDK - Tests - Improved tests for serializing lists containing objects (#3326)
Added test_fail_on_handling_list_arguments_containing_python_objects
Added test_handling_list_arguments_containing_serializable_python_objects
Moved test_handling_list_arguments_containing_pipelineparam to component_bridge_tests
2020-03-24 10:06:45 -07:00
Alexey Volkov 194278337b
SDK - Moved python op pipeline compilation test to bridge tests (#3323) 2020-03-21 00:18:44 -07:00
Alexey Volkov 264ff37c1e
SDK - Moved _dsl_bridge to dsl (#3267)
This is a pure refactoring change.
The components library should not have any dependencies on the DSL library.
2020-03-14 00:12:34 -07:00
Alexey Volkov 8ca603d679
SDK - Tests - Testing command-line resolving explicitly (#3257)
* SDK - Tests - Testing command-line resolving explicitly

After the recent small refactoring of the task resolving flow in the component library, some tests we left unupdated with compatibility shims added to make the tests pass.
This PR updates the remaining tests and removes the shims.
This mostly involves using explicitly using `_resolve_command_line_and_paths`.

Some tests that validate the behavior of the dsl bridge were moved to `component_bridge_tests.py`

* Indented the component texts
2020-03-11 19:38:38 -07:00