Commit Graph

879 Commits

Author SHA1 Message Date
Ajay Gopinathan 911562f8d3
fix(sdk): Relax the requirement that component inputs/outputs must appear on the command line. (#6268)
* Relax the requirement that component inputs/outputs must appear
on the command line.

This change enables component builders to define their implementation
(i.e. the container arg and command) independent of the actual
component inputs/outputs defined in component.yaml. The latter will be
used when determining inputs/outputs during compilation.

Only works for tasks that turn into ContainerOps during compilation.
Naturally, does not work for ContainerOps (which have no inputs/outputs
anyway).

* fix bugs, update goldens.

* Fix issue with inputs.

* merge and update.

* Restore compiler yamls.

* Disambiguate parameters and artifacts in component bridge.

* Restore goldens from HEAD.

* restore compiler_tests.py to HEAD.

* str-ify pipeline params.

* cr comments.
2021-08-10 14:40:25 -07:00
Yaqi Ji 0ac67d0c05
test(sdk): Ignore kfp sdk version when comparing golden (#6281) 2021-08-09 19:13:25 -07:00
Yaqi Ji 1752d372b4
chore(sdk): Create RELEASE.md for future release documentations (#6276) 2021-08-09 15:26:24 -07:00
Chen Sun d48792c373
test(sdk): restore a v2-compatible unit test (#6263) 2021-08-09 11:18:23 -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
Chen Sun 903b98654e
feat(sdk.v2): Define BaseComponent, ComponentSpec, and PipelineTask. (#6210)
* Define BaseComponent, ComponentSpec, and PipelineTask.

* fix dep

* disable positional arguments

* address feedback

* address feedback
2021-08-06 08:54:43 -07:00
Chen Sun f4657ba42a
feat(sdk.v2): Add HTML and Markdown artifact types (#6246) 2021-08-06 02:24:42 -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
Yuan (Bob) Gong 2181b2fb8b
feat(sdk): add_default_resource_spec container op transformer (#6203)
* feat(sdk): add_default_resource_spec container op transformer

* set memory request/limit for sampOOMed samples

* refactor

* adjust tensorboard minio memory usage

* adjust resource usage

* clean up

* address feedbacks
2021-08-05 15:28:17 +08:00
Toshiya Kawasaki f116e2cc85
fix(sdk): google client, Enable to provide app engine region that scheduled job is created in (#6145) 2021-08-03 11:03:12 -07:00
Gerard Casas Saez 3ec8b82fa4
feat(sdk): Allow parametrization of ui_host in kfp.Client (#6124)
* Update _client.py

* add docs
2021-08-02 14:02:10 -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 27051ab9d1
feat(sdk.v2): add `enable_caching` option in `create_schedule_from_job_spec` (#6119) 2021-07-22 23:00:07 -07:00
Yaqi Ji 1ad2015d90
feat(sdk): add deprecation warning for AiPlatformClient (#6106)
* feat(sdk): add deprecation warning for AiPlatformClient

* Update warning to provide more context:
2021-07-22 13:10:07 -07:00
Shuhei Fujiwara 9ebbe7b35f
fix(sdk): Fix type hints for create_run_from_job_spec. Fixes #6092 (#6098) 2021-07-22 00:21:25 -07:00
Toshiya Kawasaki 78067d1dd7
fix(sdk): google client: set ai platform endpoint by region (#6011) 2021-07-21 16:29:24 -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
Toshiya Kawasaki 157dccbf4e
chore: Fixed typos and removed not referred private functions in google client SDK (#6012) 2021-07-19 18:34: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
sina chavoshi fdab2e679c
feat(sdk): Add support for executor input in dsl_util.py (#6057)
* Add support for executor input

* chagne method name to _executor_input_placeholder
2021-07-16 18:43:13 -07:00
Alexey Volkov d69b6ae82a
chore(components): Removed stray files (#6062) 2021-07-15 21:40:34 -07:00
Alexey Volkov 561622c9f8
chore(components): Added canonical location for some components (#6060)
* Components - Added canonical location for some components

* Fixed the component.py files
2021-07-15 21:28:12 -07:00
Chen Sun 24c551d3fc
feat(sdk.v2): enable_caching in v2 client defaults to compile time settings. (#6052) 2021-07-15 14:58:37 -07:00
Alexey Volkov 9b679c5fb8
SDK - Components - Added support for annotations to create_graph_component_from_pipeline_func (#5991) 2021-07-15 01:48:40 -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
Ilias Katsakioris 52b0792e9f
feat(sdk): Add credentials to authenticate with ServiceAccountTokens. Part of #5138 (#5676)
* Introduce ServiceAccountTokenVolumeCredentials

Part of kubeflow/pipelines#5138

This is a subclass of TokenCredentials and implements the logic of
retrieving a service account token provided via a ProjectedVolume.

The 'get_token()' method reads and doesn't store the token as the
kubelet is refreshing it quite often.

Relevant docs:
https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#service-account-token-volume-projection

* Attemp to use credentials when in-cluster

If the KFP client detects it's running inside a pod and the user hasn't
provided any credentials, it now attempts to set up credentials based on
a projected service account token.

* Move credentials to kfp.auth module

Also change some names and values to avoid "ml-pipeline" references.

* Import kfp.auth lazily during the Client init

* Have credentials handle errors internally

* Let ServiceAccountTokenVolumeCredentials handle OSErrors internally
* Have the default-creds-setter only check if credentials provide a
  valid value
* Use Configuration's 'refresh_api_key_hook' instead of having duplicate
  code

* Remove dead code

* Add kfp.auth in the setup.py

* Move abstraction to the 'refresh_api_key_hook' method
2021-07-08 16:48:22 -07:00
Wakana Nogami 9a6b0e8852
feat(v2,sdk): Add service_account as args to create_schedule_from_job_spec (#5994) 2021-07-08 14:43:22 -07:00
Gerard Casas Saez 4d75ec98b2
feat(sdk): Make kaniko_executor_image a parameter for ContainerBuilder (#5990) 2021-07-08 13:18:22 -07:00
Joe Liedtke ade34542e0
chore: Updates argoproj/argo URLs to argoproj/argo-workflows (#5969)
* Updt argoproj/argo URLs to argoproj/argo-workflows

* Update link to workflows.ts

* Update license.txt to reduce # of changed lines

* Revert changes to backend Dockerfile & license.txt

* Update license.txt, keep line endings
2021-07-06 21:52:20 -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
Elias Nehme cbb83a5628
feat(sdk): json serialization of dict/list items in run args, fixes #5896 (#5927) 2021-07-01 03:23:23 -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
Yuan (Bob) Gong a95bfd66c2
feat(v2/dsl): support minio & s3 artifacts in v2 python component. Fixes #5838 (#5909)
* feat(v2/dsl): support minio & s3 artifacts in v2 python component

* fix minio output artifact key

* fix

* fix
2021-06-24 00:47:19 -07:00
Jaeyeon Kim 069d5a7bda
feat(sdk): add timeout option to kfp run submit. Fixes #5806 (#5892)
Signed-off-by: Jaeyeon Kim <anencore94@gmail.com>
2021-06-23 14:13:19 -07:00
Chen Sun 3f45f78a3d
fix(sdk): Fix default value of component input not picked up. Fixes #5880. (#5903)
* Fix default value of component input not picked up

* fix v2 compat
2021-06-23 13:25:18 -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
Trs a1740b4dfa
fix(sdk compiler):Fix v2 compile for exit handler Fixes #5854 (#5899)
* punch the hole to exit handler

* add pipeline parameter to test data
2021-06-22 02:21:54 -07:00
Jongseob Jeon 329ddcaaff
feat(sdk): set shell=False to run LocalClient both docker and local mode (#5751)
* add converter in _generate_cmd_for_docker_execution

* remove converter and use cmd directly with shell=False
2021-06-11 12:06:34 -07:00
Yuan (Bob) Gong 2bee21aae9
fix(sdk/compiler): v2 compat - fix mlpipeline-ui-metadata artifact. Part of #5666 (#5832)
* fix(sdk/compiler): v2 compat - fix mlpipeline-ui-metadata artifact

* fix

* add test case

* address feedback, fix the bug in less hacky way
2021-06-10 17:14:00 -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 0fc88c3748
chore: update deprecated download_as_string to download_as_bytes (#5822)
* Update deprecated download_as_string to download_as_bytes

* Add more usage
2021-06-09 15:15:51 -07:00
john li 5dcbd35b71
chore: add link and Python 3.8/3.9 classifiers to setup.py (#5715)
* Add link and Python 3.8/3.9 classifiers to setup.py

The link should appear on PyPI: https://pypi.org/project/kfp/#description

* use "The Kubeflow Authors" in setup.py

* Include more links in Python package description
2021-06-04 12:47:48 -07:00