Commit Graph

700 Commits

Author SHA1 Message Date
Yuan Gong d79071c0be chore(release): bumped version to 1.4.1 2021-02-25 23:50:18 +00:00
Yuan Gong 6de0c6c9e8 chore(release): bumped version to 1.4.1-rc.1 2021-02-25 11:39:59 +00:00
Yuan (Bob) Gong 8ba8758d13 chore(sdk): update requirements.in to be in sync with setup.py (#5187)
* Update requirements.in

* Update requirements.in

* chore(sdk): keep requirements.in and setup.py in-sync
2021-02-25 19:34:04 +08:00
Yuan (Bob) Gong a48dc26cdb test: fix tfx version consistently. Part of #5137 (#5179) 2021-02-25 19:33:13 +08:00
Jiaxiao Zheng 846423a870
feat(sdk): Always add pipeline root as a pipeline parameter (#5122)
* refactor pipeline root passing

* fix test
2021-02-10 16:29:57 -08:00
Chen Sun 051a022937
feat(sdk.v2): Allow set pipeline_root via @dsl.pipeline decorator. Make pipeline_root optional. (#5107)
* Allow set pipeline_root via @dsl.pipeline decorator.

* test covering pipeline_root not set
2021-02-07 02:06:32 -08:00
Jiaxiao Zheng 7c50708aad
feat(sdk.v2): Update v2 compiler to support v2 component. (#5104)
* update compiler

* lint

* fix test
2021-02-05 17:40:37 -08:00
Chen Sun 16a4fe26ea
fix(sdk): Add back 'kfp.v2.components' as a package in setup.py (#5099) 2021-02-04 03:07:37 -08:00
Jiaxiao Zheng 85a3b51713
feat(sdk): Add v2 component to build_python_component (#5079)
* porting the original PR

* comment

* refactor

* remove python2

* comment on default entrypoint

* update comment

* min versioned KFP

* fix tests
2021-02-04 01:50:36 -08:00
Chen Sun cbb255396d
chore(sdk): add `absl-py` in kfp install_requires (#5097)
* Update setup.py

* Update setup.py
2021-02-04 01:03:36 -08:00
Chen Sun 91c5a93c8e
chore(sdk.v2): Migrate to the new IR with subdag support (#4981)
* migrate to new ir

* address review comments

* fix bugs

* fix pipeline parameters and tests

* fix components import

* fix typo
2021-02-03 04:11:37 -08:00
Chen Sun 9e0b9aa1f6
chore(sdk): Bring back kfp.v2.components as an alias to kfp.components (#5083)
* Bring back kfp.v2.components with a DeprecationWarning

* fix test

* no deprecation warning
2021-02-03 02:07:36 -08:00
Jiaxiao Zheng 86f03a90a3
chore: Improve the error message when incompatible placeholders are connected (#5082) 2021-02-03 00:10:36 -08:00
Chen Sun abdcc2d7c1
release(sdk): Bump KFP SDK version to 1.4.0 (#5081) 2021-02-02 18:30:36 -08:00
Chen Sun 26de102f82 chore(release): bumped version to 1.4.0-rc.1 2021-02-01 00:18:50 -08:00
Chen Sun 2e7eb9d356
fix(SDK): require PyYAML>=5.3 (#5063) 2021-01-30 23:36:02 -08:00
Vitalii Vokhmin 2f1db59798
fix(sdk): compile ParallelFor in a deterministic manner (#4926)
* fix(sdk): compile ParallelFor in a deterministic manner

During compilataion ParallelFor components end up with randomized names,
which makes it very inconvenient to compare two versions of a pipeline.
This commit fixes this issue.

* fix(sdk): fix new parallel-for test cases
2021-01-29 18:31:09 -08:00
Michalina Kotwica ce985bc287
fix(sdk): Allow keyword-only arguments in pipeline function signature (#4544)
* add test for keyword-only arguments in pipeline func

* fix: kwargs-only argument for pipeline func

* test: kwargs generate same yaml as args

* remove whole metadata

* assert -> self.assertEqual

* programmatic example --> fixed example

* same name for both

Co-authored-by: Alexey Volkov <alexey.volkov@ark-kun.com>
2021-01-29 18:31:02 -08:00
Chen Sun ecb14f40bb
chore(sdk): Remove v2 components fork, use v1 instead. (#5042)
* Remove v2.components fork

* fix setup.py
2021-01-28 18:20:07 -08:00
Chen Sun f906dee88f
chore(sdk): Rename test_source.py to pipeline_source.py to make it compatible with pytest (#5024) 2021-01-22 01:01:27 -08:00
Jiaxiao Zheng 3ee0ae01eb
chore: Resolve comments in #5003 (#5009)
* use pathlib

* fix tests
2021-01-21 09:29:02 -08:00
Jiaxiao Zheng a36a62a700
feat(sdk): Artifact metadata related placeholder for components. (#5003)
* resolve comments.

* fix tests

* wip: add structures and skeleton for component resolution logic

* add generator

* fix the problem

* cleanup

* add a test

* fix tests
2021-01-19 08:57:45 -08:00
Chen Sun 0c600a2cb8
fix(sdk.v2): Fix the bug where pipeline_parameters is not used. (#5002)
* fix bug on pipeline parameters not being used.

* address review comments
2021-01-19 07:59:45 -08:00
Jiaxiao Zheng e0c814451d
chore(sdk): Add annotations for new-styled KFP component (#4989)
* undeprecate and add annotation

* fix the case for missing metadata

* resolve comments

* apply suggestion
2021-01-15 11:17:51 -08:00
Alexey Volkov 691eefc599
fix(sdk): Components - Fixed python components that use \n. Fixes #4939 (#4993)
* SDK - Components - Fixed python components that use \n

The escape sequence was being replaced by the `echo` command.

Apparently, unlike in the `bash` shell, the `echo` command of the `sh` shell expands the escape sequences by default and does not support an option to turn it off. (For some reason the -n option works properly even though it should not).

Fixes https://github.com/kubeflow/pipelines/issues/4939

* Fixed the test data

* Fixed the deprecated container component builder

* Fixed the new compiler test case

* Added test
2021-01-14 18:21:51 -08:00
Jiaxiao Zheng 279694ec6d
feat(sdk): Container entrypoint used for new styled KFP component authoring (#4978)
* skeleton

* add entrypoint utils to parse param

* wip: artifact parsing

* add input param artifacts passing and clean unused code

* wip

* add output artifact inspection

* add parameter output

* finish entrypoint implementation

* add entrypoint_utils_test.py

* add entrypoint test

* add entrypoint test

* get rid of tf

* fix test

* fix file location

* fix tests

* fix tests

* resolving comments

* Partially rollback

* resolve comments in entrypoint.py

* resolve comments
2021-01-14 16:01:21 -08:00
Alexey Volkov d629397654
feat(sdk): Components - Support annotations when creating components from python (#4996)
The component specification has always supported component annotations, but there was no way to specify them for the components generated from python. This PR fixes that.
2021-01-14 13:59:31 -08:00
Mansoor Baba Shaik 0a7da2d2db
feat(sdk): Replace logging and print statements with click echo statements for cli (#4622) 2021-01-14 08:41:04 -08:00
radcheb 5633b9abda
fix(sdk): fixes unresolved PipelineParam when static list passed to dsl.ParallelFor. Fixes #4890 (#4891)
* fix parallelfor compiling items + add tests

* remove debug print

* fix tests

* fix parallelfor_pipeline_param_in_items_resolving test

* debug test

* fix tests

* Revert "debug test"

This reverts commit 57451143bd.

* fix tests
2021-01-14 00:09:03 -08:00
Shu 23c12a9fb4
chore: add instruction detail in _auth.py print statement. Fixes #4987 (#4988)
* Update _auth.py with more instructions

* Update sdk/python/kfp/_auth.py

Co-authored-by: Jiaxiao Zheng <jxzheng@google.com>

Co-authored-by: Jiaxiao Zheng <jxzheng@google.com>
2021-01-13 10:30:36 -08:00
Niklas Hansson c2a8bd0b93
Added checks for parallism values (#4950)
* Added checks for parallism values

* fix variable name
2021-01-08 08:28:55 -08:00
Jiaxiao Zheng a56efb2061
feat(sdk): Merge artifact ontology from v2 to the classic KFP. (#4963)
* move modules back to v1

* move and fix ontology tests
2021-01-07 23:00:53 -08:00
Yang Pan c484cfa46c chore(release): bumped version to 1.3.0 2021-01-07 00:39:26 -08:00
Jiaxiao Zheng 7540ba5c3b
feat(sdk): Implements artifact URI placeholder. (#4932)
* add placeholder to spec

* add output_directory to pipeline

* respect uri placeholder in file outputs

* wip: add data passing rewriting logic to respect the uri semantics

* merge input_uri and paths when instantiating ContainerOp

* fix

* fix workflow rewriting

* Add topology rewriting

* add a test case, and various fixes

* make the test case more complex

* Fix the case when working with OpsGroup

* Fix test case

* fix resolving test

* fix redundant cmd lines

* fix redundant cmd lines

* resolve comments

* fix file outputs

* resolve comments

* copy file outputs instead of modifying inplace.
2021-01-05 20:39:51 -08:00
Niklas Hansson 24732b9dae
feat(compiler): add dsl operation for parallelism on sub dag level (#4199)
* Added subdag parallelism

Authored-by: NikeNano <niklas.sven.hansson@gmail.com>
Co-authored-by: guanhuichen <guanhuichen@gmail.com>

* added error handling, fixed comment and refactored

* updated with sleep and TODO

* fix imports

Co-authored-by: guanhuichen <guanhuichen@gmail.com>
2020-12-26 22:10:27 -08:00
Jiyong Jung e07ba451af
fix(sdk): fixes typo of 'desc'. (#4938) 2020-12-24 00:38:26 -08:00
Chen Sun a347765630
chore (sdk.v2): Error out on using InputPath placeholder for artifacts require importer. (#4929)
* throw error on importer-inputpath combination

* address review comments
2020-12-22 17:44:27 -08:00
Chen Sun cd6580cd00
chore(sdk): update requirements.txt (#4928) 2020-12-21 23:38:26 -08:00
Chen Sun 88dbfda02b
chore(sdk): Add inputUri and outputUri placeholders in v1 (#4913)
* SDK - Components - Added support for inputUri and outputUri placeholders

* remove InputUriSpec and OutputUriSpec

* Address review comments

Co-authored-by: Alexey Volkov <alexey.volkov@ark-kun.com>
2020-12-18 08:28:25 -08:00
Chen Sun 5445ce82c7 chore(release): bumped version to 1.2.0 2020-12-17 23:24:32 -08:00
Ilias Katsakioris 8f70bf325e
fix(sdk): Do not wait for resource deletion (#4820)
When calling the delete() method of a ResourceOp we need to ensure we do
not wait for its deletion.

The reason for this is described in [1]: If a pipeline creates a
resource which is being consumed by its steps (e.g., a PVC), the step
deleting the resource will hang waiting for the Kubernetes resource
deletion which, in turn, is waiting for the other steps to get deleted.
As a result, the pipeline never finishes.

This commit allows specifying flags for the ResourceOp kubectl commands
and defaults to the '--wait=false' flag for the deletion.

Specifying flags for a ResourceTemplate is not supported in Argo v2.7
that we currently deploy. But they will be once we upgrade to v2.11+
[2]. This does not affect the delete() method because we don't rely on
Argo's ResourceTemplate for it.

[1] https://github.com/kubeflow/pipelines/issues/4506
[2] https://github.com/kubeflow/pipelines/issues/4553

Signed-off-by: Ilias Katsakioris <elikatsis@arrikto.com>
2020-12-17 16:54:24 -08:00
Yuan (Bob) Gong 7fca374e94
chore(sdk): bump kfp-server-api dependency to >= 1.1.2 (#4909) 2020-12-17 13:10:25 -08:00
Jiaxiao Zheng 2386471cdf
feat(sdk): Add artifact ontology and migrate compiler utils to onboard artifact types (#4901)
* update

* change get_artifact_type to classmethod

* fix NoneType serialization

* fix tests

* fix compiler cli tests

* fix tests

* resolve comments

* fix tests

* drop schema and metrics classes

* fix tests

* resolve comment

* resolve comment
2020-12-17 10:51:09 -08:00
Yuan (Bob) Gong 44fcda7dca
fix(sdk): make healthz exception visible in logs by default (#4904)
* fix(sdk): make healthz exception visible in logs by default

* only catch exceptions, but not keyboard interrupt

* address comments
2020-12-16 20:29:08 -08:00
Michalina Kotwica 5169489be5
feat(sdk): allow calling GroupOp.after with multiple ops (#4788)
* allow calling ContainerOp.after with multiple ops

* m: simplify signature of OpsGroup.after

as it's not public anyway, chances of calling it with by-keyword
argument are small compared to calling it with unpacking an arbitrary
list, which could be empty (previous signature would fail for empty list)
2020-12-16 15:51:09 -08:00
capri-xiyue 2b718f1bbd
docs(sdk): update comments of _create_job_config (#4899)
* update comments of _create_job_config

* cleand up comments

* fixed comments
2020-12-16 06:16:22 -08:00
Jiaxiao Zheng 7591805377
feat(SDK): adds Artifact base class. (#4895)
* Add base Artifact class

* add __repr__ test

* add __repr__ test

* add serialization

* add serialization tests

* add deserialization tests

* add absl-py

* update requirements

* Resolve comments
2020-12-15 13:18:20 -08:00
Kenta Onishi 5a4b70e37c
feat(sdk): Add settings of the dnsConfig field. Fixes #4836 (#4837)
* feat(sdk): Add settings of the dnsConfig field. Fixes #4836

* feat(sdk): Add dnsConfig example and sample.

* feat(sdk): Refactor dnsConfig param.

* feat(sdk): Refactor dnsConfig param.
2020-12-14 20:05:49 -08:00
Alexey Volkov 7a66414cf7
feat(sdk): Components - Restored stack traces in lightweight python components. Fixes #4273, #4849 (#4861)
Currently were running the python code inline using `python -c <code>`.
This has two issues:
1) Python does not show source code line in exception stack traces
2) inspect.getsource does not work. This method is used in PyTorch JIT for example.

We solve these issues by writing the code into a file before executing it.

The disadvantage of the new approach is that it adds complexity, a filesystem write operation and also requires the `sh` executable to be present (we could replace it with python-based program if needed).
2020-12-14 14:33:49 -08:00
Vitalii Vokhmin 2f3a686e54
feat(sdk): add ability to set retry policy (#4858)
* feat(sdk): add ability to set retry policy

This fixes the second part of the issue described in #4333
The first part was addressed in #4392

* feat(sdk): validate retry policy name

* feat(sdk): simplify retry policy interface
2020-12-11 14:47:29 -08:00