Commit Graph

24 Commits

Author SHA1 Message Date
Connor McCarthy 9e9e1081c6
fix(sdk): fix boolean default value serialization bug (#8444)
* add test cases

* fix bug

* add v1 component yaml back compat changes

* update golden snapshot
2022-11-11 15:42:33 -08:00
Connor McCarthy 24e17f7352
chore(sdk): quiet noisy SDK unit test output (#8434) 2022-11-09 17:47:39 +00:00
Connor McCarthy e371fa3795
feat(sdk): add compilation logic for google artifact types (support custom artifact types pt. 2) (#8232)
* remove dependency of deprecated on v2

* use new artifact identification logic

* add custom artifact type compiler test

* compile schema_version from non-kfp artifacts

* update tests

* add importer to compiler test

* update golden snapshots

* fix type checking code

* undo executor_test diff

* remove gcpc types compiler test

* add compilation test comment

* update google artifact handling

* update compiler test

* only permit system. and google. artifact types; add tests

* update compiler test

* simplify type checking logic

* use bundled artifact types in PipelineArtifactChannel

* raise error on unknown v1 input or output

* add type utils and move functions

* add type utils tests

* remove schema_version from inputspec and outputspec

* update artifact proto creation and tests

* propogate bundled artifact type string changes throughout sdk

* update golden snapshot

* remove unused v1 compat and tests

* update type checking and tests to validate schema_version using semantic versioning

* update importer sample

* update test data config

* update test_data config

* clean up sample

* clean up sample
2022-09-12 14:00:02 -06:00
Connor McCarthy 16c7d6658e
test(sdk): create SDK execution test suite and restructure read/write tests (#8245)
* update client for graph components

* use yaml for config

* simplify read write tests

* add test script

* restructure yaml and read/write tests

* add execution test file

* move test_data; update paths; update readme

* update kfp endpoint

* update pipeline with env

* update logging

* update config

* update kfp endpoint and timeout

* add kfp as requirement

* mock kfp_package_path for lightweight component execution

* revert pipeline name changes

* update config with name

* update read write tests to use explicit name

* update execution tests to use explicit name
2022-09-12 18:33:06 +00:00
Chen Sun 48574dc648
feat(sdk): Support pipeline outputs (#8204)
* Support pipeline outputs

* release note
2022-08-29 20:26:53 +00:00
Chen Sun 5ce4954d6b
feat(sdk)!: Implement Graph Component (#8179)
* Implement Graph Component

* isort imports

* release note

* address review comments

* address review comments
2022-08-26 09:28:49 +00:00
Bo 51bea09833
feat(sdk): Support Parallelism in ParallelFor in KFP SDK V2 (#8146)
* feat(sdk): add support for ParallelFor parallelism setting

* add parallelism value check

* Add unit tests

* Adding a compiler test

* used None as default parallelism input signature, other minor fixes on format and tests

* fix import statements

* add release.md message

* update ParallelFor docstring

* fixed docstring comments

* removed 'optional' in docstrings
2022-08-17 21:06:01 +00:00
Connor McCarthy bdff332ac6
feat(sdk): support more than one exit handler per pipeline (#8088)
* add compiler test pipeline with multiple exit handlers

* remove blocker of multiple exit handlers

* move exit handler builder logic to pipeline_spec_builder

* build all exit handlers per pipeline

* add compiler test with IR inspection

* prevent usage of cross-pipeline after

* test cross-pipeline after is prevented

* update existing task dependency logic and tests

* add v2 sample test

* remove cross-pipeline .after

* prevent cross-dag data dependency for dsl features

* add compiler test pipeline with nested exit handlers

* add support for nested exit handlers

* clean up pipeline with nested exit handlers

* remove sample with multiple exit handlers

* remove compiler test with nested exit handlers

* add compilation guard against nested exit handlers in subdag

* update release notes
2022-08-10 16:56:21 +00:00
Scott_Xu 04c827fc3a
feat(sdk): supporting bring your own container for arbitrary input and outputs (#8066)
* support container_component decorator for function with no inputs

* resolve review comments

* add sample tests for milestone 1

* modify compiler test data

* resolve reviews

* resolve reviews

* WIP

* implementation of function of no inputs

* fixed sample test

* re-fix sample test

* fix rebase merge conflict

* resolve formatting

* resolve isort error for test data

* resolve comments

* fix nit

* resolve nit

* add implementation for placeholders i/o, sample and compiler tests

* resolve comments and merge logic for constructing container component

* resolve comments

* resolve comments

* fix assertion messages

* add error handling for accessing artifact by itself

* add test for raising error for accessing artifact by itself
2022-08-08 21:00:53 +00:00
Chen Sun 1dd06cd8e8
feat(sdk): Allow artifact inputs in pipeline definition. (#8044)
* Allow artifact inputs in pipeline definition.

* release note

* isort fix

* remove unused imports

* Delete flycheck_compiler.py

* Delete flycheck_pipeline_spec_builder.py

* Delete flycheck_structures.py

* address cr comment
2022-07-28 00:17:53 +00:00
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
Connor McCarthy 850a750496
feat(sdk): add retry policy support to kfp v2 (#7867)
* depend on kfp-pipeline-spec>=0.1.16

* implement RetryPolicy structure

* implement RetryPolicy structure tests

* implement .set_retry method on PipelineTask

* implement retry policy compilation logic

* implement compiler tests for retry

* implement pipeline with retry compilation test

* add release note

* clean up
2022-07-11 16:44:52 +00:00
Connor McCarthy 281151c051
chore(sdk): improve IR read/write testing (#7920)
* add more load component test cases

* add read write equality tests

* add copyright

* remove duplicative structures tests

* add if __name__ == '__main__' block
2022-06-24 09:45:15 -06:00
Connor McCarthy c6125ffc44
feat(sdk): enable component compilation via cli (#7649)
* enable component compilation via cli

* reorganize compiler/test_data dir

* clean up pipeline samples

* add component compilation test cases

* update compiler test_data README

* add compiler tests

* test component deserialization is lossless
2022-06-17 05:49:10 +00:00
Chen Sun 0ada48b55a
chore(sdk): move pipeline test samples closer to compiler unit tests. (#7849)
* chore(sdk): move pipeline test samples closer to compiler unit tests.

* explicitly list test files

* remove dead code
2022-06-08 18:35:17 +00:00
Connor McCarthy a6ec449273
feat(sdk): only use IR when saving component (#7690)
* move function into compiler module

* remove v2 readable yaml write path

* remove v2 readable yaml test data; remove duplicate tests
2022-05-24 22:23:33 +00:00
Connor McCarthy 62972eccf9
feat(sdk): enable compilation of primitive components (#7580)
* clean up relevant files

* use context manager for temporary directory cleanup

* add component compilation methods

* add component compilation tests

* add more complete pipeline_func argument handling

* use context manager for handling type check mode

* improve checks on inputs for component compilation

* correct pipeline name for primitive component IR

* simplify component compilation logic

* extract compiler methods

* move compiler helpers to helpers file to avoid circular imports

* remove underscore prefix from functions in hidden module

* move helpers tests to helper_test module

* put to_pipeline_spec on ComponentSpec

* fix inputs reference

* use same naming regex for pipelines and components

* permit compilation of all BaseComponent subclasses

* clean up docstrings

* merge compiler.helpers into pipeline_spec_builder

* modify docstrings; refactor

* modify docstring
2022-05-13 20:12:34 +00:00
Connor McCarthy 5da3826bb5
feat(sdk): use custom basemodel and remove pydantic (#7639)
* fix discovered bug

* update tests

* implement custom BaseModel

* use basemodel for structures

* remove pydantic dependency

* assorted code cleanup
2022-05-04 12:56:32 -06:00
Connor McCarthy f70413ad7c
chore(sdk): stop using pydantic for serialization (#7536)
* add ir_utils

* add ir_utils tests

* use ir_utils to write ir to file

* cast posix path to string in `kfp components build` command

* add copyright

* remove unused import

* update setup.py packages
2022-04-12 17:03:55 +00:00
Yaqi Ji 04123280a4
fix(sdk): add default value for inputs (#7405)
* fix(sdk): add default value for inputs

* merge conflict

* release

* fix sample
2022-03-23 18:59:20 +00:00
Connor McCarthy c7301c449c
feat(sdk)!: use yaml for IR package (#7431)
* change serialization format from json to yaml

* refactor: use guard clause for clarity

* convert test data from json to yaml

* add and update tests

* permit deprecated compile to json

* re-add json test data

* update compiler tests

* refactor Compiler._write_pipeline_spec_file

* update golden snapshots

* update sample output extensions

* test file extension exceptions and warnings

* update release notes

* remove json golden snapshots
2022-03-21 21:45:31 +00:00
Connor McCarthy bfffa83fba
chore(sdk): apply docformatter (#7438) 2022-03-18 17:02:40 +00:00
Connor McCarthy 5fb126a715
feat(sdk): alias v2 imports and provide DeprecationWarning (#7398)
* feat(sdk): alias v2 imports and provide DeprecationWarning

* simplify tests

* enable import of v2 namespace

* assert DeprecationWarning is raised

* update copyright

* silence pylint

* move v2 alias tests

* use assertWarnsRegex instead of assertWarns

* fix tests

* remove test for deprecation warning

* update copyright
2022-03-15 03:28:39 +00:00
Yaqi Ji 8bb0d0e025
feat(sdk)!: move v2 to main namespace (#7376)
* feat(sdk)!: move v2 to main namespace

* edit samples
2022-03-04 21:56:51 +00:00