Commit Graph

243 Commits

Author SHA1 Message Date
Chen Sun d1f90b34d6
chore: Release KFP SDK and v2 launcher 1.8.0 (#6505) 2021-09-03 16:29:10 -07: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
Yaqi Ji 8f10bcdf16
chore: Release KFP SDK and v2 launcher 1.7.2 (#6442)
* Update RELEASE.md

* Update __init__.py

* Update v2_compat.py

* Update RELEASE.md
2021-08-25 19:58:04 -07:00
Chen Sun 96bb17531f
test(sdk): ignore kfp version in v2_compatible tests (#6444) 2021-08-25 17:06:05 -07:00
Yaqi Ji 937cacd4ce
feat(sdk): add default schema_version to pipeline (#6366)
* feat(sdk): add default schema_version to pipeline

* sync api for go

* Fix tests and address comments

* Bump pipeline_spec version

* Fix v1 tests

* rebase to master

* sync api for go

* Fix tests and address comments

* Bump pipeline_spec version

* Fix v1 tests
2021-08-24 01:04:39 -07:00
Ajay Gopinathan f3f383c2ff
chore(sdk): Refactor and move all v2 related code to under the v2 namespace. (#6358)
* Refactor and move all v2 related code to under the v2 namespace.

Most of the changes are around imports and restructuring of the
codebase. While it looks like a lot of code was added, most of the code
already existed and was simply moved or copied over to v2. The only
exceptions are:
- under kfp/v2/components/component_factory.py: some helper functions
  were copied with simplification from _python_op.py
- we no longer strip the `_path` suffix in v2 components.

Note: there is still some duplication of code (particularly between
component_factory.py and _python_op.py), but it's ok for now since we
intend to replace some of this with v2 ComponentSpec + BaseComponent.

* Update setup.py.

* update tests.

* revert accidental change of gcpc

* Fix component entrypoint.

* Update goldens.

* fix tests.

* fix merge conflict.

* revert gcpc change.

* fix tests.

* fix tests.

* Add type aliases for moved files.

* merge and update goldens.
2021-08-17 19:25:37 -07:00
Chen Sun 7f6e11dedc
chore: Release KFP SDK and v2 launcher 1.7.1 (#6369) 2021-08-17 16:38:37 -07:00
Ajay Gopinathan 609e5b784f
fix(sdk): Ensure pip exists for lightweight Python-based components. (#6359)
* Ensure pip exists for lightweight Python-based components.

* Update goldens.
2021-08-16 23:40:42 -07:00
Chen Sun 434e5c3489
fix(sdk): block dsl.importer usage in KFP OSS. Fixes: #6323 (#6330)
* block dsl.importer in KFP OSS

* address cr comments
2021-08-16 01:02:06 -07:00
Yuan (Bob) Gong befd89c6ec
fix(sdk): pipeline name is required in v2 compatible mode. Fixes #6197 (#6332)
* fix(sdk): pipeline name is required in v2 compatible mode

* Update xgboost_sample.py
2021-08-13 14:00:04 -07:00
Chen Sun 7559e27cfb
feat(backend/sdk): Rename `pipeline-output-directory` to `pipeline-root`. Fixes #6307 (#6329) 2021-08-13 00:41:54 -07:00
Yaqi Ji 3044989dbf
chore: release KFP SDK and v2 launcher 1.7.0 (#6257)
* Update __init__.py

* Update v2_compat.py

* Update goldens
2021-08-06 17:18:25 -07:00
Ajay Gopinathan c5591f2652
feat(sdk): Enable the use of Executor from KFP package for v2 lightweight components (#6202)
* Enable the use of v2 Executor from KFP package.

This avoids the need to paste Executor code for v2 components into
the entrypoint of lightweight components.

* Update tests.

* quote package path.

* quote package path.

* escape fragment

* Update golden files.

* update goldens.

* Cleanup.

* More cleanup.

* update goldens.

* style updates.

* clean up sample tests.

* fix trailing comma

* Try using signed urls.

* fix

* fix presubmit

* try /bin/bash for Makefile shell

* undo signed url change.

Co-authored-by: Yuan (Bob) Gong <4957653+Bobgy@users.noreply.github.com>
2021-08-05 14:53:03 -07:00
Yuan (Bob) Gong b1c76e0cd3
test(v2): build go images using ko. Fixes #6238 (#6240)
* test(v2): build go images using ko

* clean up

* integrate launcher license checking

* clean up

* fix go v2 test
2021-08-05 06:33:18 -07:00
Niklas Hansson e6becd71ff
feat(sdk): add GPU runtime resource request and fix spelling in runtime_resouce_request. Fixes #4877. Fixes #1252 (#5972)
* Add runtime resource request for GPUs

* clean up

* Updated docks and add check

* updated with test

* remove from branch

* run tests

* fix gpu vendor format

* Update after feedback

* add unit tet

* remove integration test

* clean up

* Clean up

* Updated to resource_constraints instead of resource
2021-08-01 22:52:38 -07:00
Niklas Hansson ed2ba1a6b3
chore(sdk): Argo lint requires '--kinds=workflows' argument for offline linting. (#6135) 2021-07-26 00:40:41 -07:00
Chen Sun f4c6631e51
chore: release KFP SDK and v2 launcher 1.6.6 (#6125)
* release 1.6.6

* skip failing UT
2021-07-23 14:49:39 -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
Niklas Hansson 354e4251e8
chore: add offline linting (#5981)
* Added the offline linting

* update after feedback
2021-07-20 08:39:15 -07:00
Yuan (Bob) Gong ee663d9593
chore(v2): standardize MLMD data model. Fixes #5669 (#6054)
* chore(v2): standardize MLMD data model

* change context type to system namespace

* update sdk snapshots

* fix go v2 tests

* update

* update v2 compat snapshots

* fix all samples

* fix must specify pipeline root

* add artifact display name

* add UI rendering of new fields

* fix sample tests

* let ui read artifact and execution names consistently

* fix samples

* fix frontend tests

* fix sample test

* fix last sample

* address feedback
2021-07-19 22:26:15 -07:00
Chen Sun 9bb80efedf
chore: release KFP SDK and v2 launcher 1.6.5 (#6084) 2021-07-19 13:21:14 -07:00
Chen Sun 158d15f92b
feat(sdk): Add submission time caching option override for v2 compatible mode. (#6032)
* Add submission time caching option override for v2 compatible mode.

* fix tests

* casting

* disable cache for sample test

* cleanup

Co-authored-by: capri-xiyue <52932582+capri-xiyue@users.noreply.github.com>
2021-07-14 22:05:50 -07:00
Yuan (Bob) Gong fff62e1521
chore(v2): unify pipeline name between MLMD and KFP DB. Fixes #5978 (#6038)
* chore(sdk): unify pipeline name between MLMD and KFP DB

* backend changes pipeline-name during upload

* update sdk snapshots

* add backend tests

* fix launcher

* fix tests

* address feedback
2021-07-14 20:53:51 -07:00
Yaqi Ji c6cb8acf7a
feat(sdk): Add interface for enable_caching at task level. (#6007)
* feat(sdk): Add pipeline level caching options

* Update golden

* fixing caching options

* fix tests

* add a caching disabled case

Co-authored-by: Chen Sun <chensun@users.noreply.github.com>
2021-07-13 17:33:58 -07:00
Yuan (Bob) Gong f3b369e153
fix: v2compat - handle parameter values with special characters stably. Fixes #5830 (#5973)
* fix(launcher): handle parameter values with special characters stably

* include new test case

* add tensorboard minio test case

* fix go unit tests

* update test golden

* address feedback

* fix tests
2021-07-08 22:02:23 -07:00
Yuan (Bob) Gong 8a256db1bf
feat(sdk/dsl/compiler): dsl-compile --mode flag to turn on V2_COMPATIBLE, defaults to KF_PIPELINES_COMPILER_MODE env var. Fixes #5840 (#5952)
* feat(sdk/dsl/compiler): support --mode flag which can turn on v2 compatible mode

* override compiler default mode using KF_PIPELINES_COMPILER_MODE env var

* update V1_LEGACY to V1

* add unit tests

* address feedback

* clean up

* cleanup again

* use absl.testing.parameterized for table driven tests

* update
2021-07-03 02:22:49 -07:00
Yaqi Ji 07ac566fcb
chore: release KFP SDK and v2 launcher 1.6.4 (#5916)
* Update __init__.py

* Update v2_compat.py
2021-06-24 16:30:43 -07:00
Yaqi Ji e7c281bd65
chore: Change python/kfp/compiler and cli folders from relative to absolute path (#5891)
* Update deprecated download_as_string to download_as_bytes

* Add more usage

* chore: Change python/kfp/cli from relative to absolute path

* chore: Change python/kfp/compiler from relative to absolute path
2021-06-22 11:28:31 -07:00
Niklas Hansson 5db843102a
feat(sdk): add runtime resource requests. Fixes #1956 (#5447)
* added resource request at runtime

* fixed things

* Update to use read only parameter insteadt

* added test case and better example

* Updated again

* add the validation

* add to the test suit

* work in progress

* update after feedback

* fix the test

* clean up

* clean up

* fix the path

* add the test again

* clean up

* fix tests

* feedback fix

* comment out and clean up
2021-06-10 16:27:59 -07:00
Yaqi Ji 63093d29e5
release: KFP SDK and v2 launcher 1.6.3 (#5796)
* Update __init__.py to 1.6.3

* Update v2_compat.py
2021-06-03 14:26:36 -07:00
Chen Sun 4eb722e93f
fix(sdk): resolve pipeline_root and run_uid placeholders in container env (#5772) 2021-06-02 16:26:35 -07:00
Chen Sun 2991602cfc
feat(sdk): Better error message when compiling for v2. Fixes #5688, Fixes #5727 (#5759)
* Better error message when compiling for v2

* update samples
2021-05-31 13:39:03 -07:00
Chen Sun fa5ac25678
fix(sdk): Avoid inserting duplicate input parameters in v2 compatible mode. (#5740) 2021-05-28 15:06:00 -07:00
Chen Sun 4994727f7a
test(sdk): v2 compatible UT to ignore launcher image label (#5696) 2021-05-19 18:07:45 -07:00
Chen Sun 7608fcdbb4
release: KFP SDK and v2 launcher 1.6.2 (#5682) 2021-05-18 23:08:42 -07:00
Yuan (Bob) Gong 7629e10130
chore(sdk): warn v2 compatible mode is Beta quality (#5658) 2021-05-17 21:55:40 -07:00
Chen Sun 98fd2eae92
release(sdk): release SDK 1.6.0-rc.0 (#5648)
* pin launcher version to 1.6.0-rc.0

* fix tests
2021-05-14 17:56:51 +08:00
Ajay Gopinathan c5daa7532d
fix(v2): Escape strings in RuntimeInfo. (#5601)
* Escape strings in RuntimeInfo.

This allows strings to be serialized dictionaries etc.

Also, re-enable a couple of v2 tests.

* update goldens.

* Update exit_handler.py

* add comment.

* keep last error

Co-authored-by: Yuan (Bob) Gong <4957653+Bobgy@users.noreply.github.com>
2021-05-09 02:19:08 -07:00
capri-xiyue 6717434978
[SDK] Add pod labels for telemetry purpose (#5582)
* Add pod labels for telemetry purpose

* fixed test

* added sdk label in pods

* added sdk type label

* fixed test

* added UT back

* updated UT
2021-05-05 10:43:27 -07:00
Alexey Volkov cc83e1089b
Assigned copyright to the project authors (#5587) 2021-05-05 13:53:22 +08:00
capri-xiyue 0dba00518c
chore(sdk.v2):add v2 compact metrics label (#5566)
* add-v2-compact-metrics-label

* add telemetry pod label
2021-04-29 16:06:30 -07:00
capri-xiyue 5718bc3cd2
chore(v2): added minio and s3 pipeline root support in v2 launcher (#5392)
* added minio and s3 pipeline root support in v2 launcher

* fixed style

* added sdk support for S3/MINIO credentials passing

* fixed add_pod_env unit tests

* added sample test for minio pipeline_root two step pipeline

* modified pipeline root

* resolved conflicts with master

* fixed the code based on comments

* added minio pipeline_root support

* added default minio path

* fixed typo and removed unused code/dependency

* refactored E2E test for minio pipeline root

* deleted duplicate e2e test

* change default minio artifacts path

* updated config yaml

* fixed typo
2021-04-20 20:09:41 -07:00
Chen Sun 5dafda1270
feat(sdk.v2): Support explicit importer (#5502) 2021-04-19 13:14:09 -07:00
Chen Sun 5f97a4502d
feat(sdk.v2): remove pipeline_root from compiler interface (#5492) 2021-04-16 08:49:13 -07:00
Chen Sun 1a357a0ebe
chore(sdk.v2): Deprecate dsl.ontology_artifacts, and migrate to using dsl.io_types (#5472)
* merge ontology_artifacts to io_types

* remove tests importing ontology_artifacts

* fix tests
2021-04-15 21:38:13 -07:00
Ajay Gopinathan 5651bd1efd
feat(v2): Support v2 components in KFP v2-compatible mode. (#5458)
* Support v2 components in KFP v2-compatible mode.

Adds support in v2-compatible mode for the following
* v2 lightweight function components
* support for passing ExecutorInput to component
* support for parsing ExecutorOutput from component

Also renamed several variables in RuntimeInfo as follow ups to previous
PR.

* Remove newly irrelevant variables in runtimeInfo

* update goldens.

* Renaming in runtimeInfo.

* Add v2 component pipeline tests and update goldens.

* create output directory for parameter files.

* Fix output schemas.

* Support concat placeholder.

* Use Path and MetadataPath

* update launcher.go too with new names.

* move functions around.

* add some TODOs, replace cmd placeholder.

* fix tests
2021-04-15 17:44:13 -07:00
Chen Sun f32915e88f
feat(sdk.v2): Support setting custom job spec in v2. (#5454)
* Support setting custom job spec.

* auto fill custom job jobSpec using container spec.

* fix test

* address comments
2021-04-10 09:20:04 -07: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
Ajay Gopinathan a1d453af21
chore(sdk): Allow the launcher image to be configurable. (#5360)
* Allow the launcher image to be configurable. This is especially useful
for tests.

* Address PR comments.
2021-03-23 08:27:44 -07:00
Niklas Hansson 8a32632edf
fix(sdk): make workflow validation compatible with argo CLI v2.12+. Fixes #4775, Fixes #5296 (#4804)
* updated the validation default test

* updated the version

* Update compiler.py

* Update compiler.py

* Update compiler.py

Co-authored-by: Yuan (Bob) Gong <4957653+Bobgy@users.noreply.github.com>
2021-03-18 21:10:16 -07:00