Commit Graph

113 Commits

Author SHA1 Message Date
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
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 2e7eb9d356
fix(SDK): require PyYAML>=5.3 (#5063) 2021-01-30 23:36: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
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
Yuan (Bob) Gong 7fca374e94
chore(sdk): bump kfp-server-api dependency to >= 1.1.2 (#4909) 2020-12-17 13:10:25 -08:00
Yuan (Bob) Gong cc47ad9dfc
chore(sdk): bump sdk's dependency on kfp-server-api (#4855)
* chore(sdk): bump sdk's dependency on kfp-server-api

* Update setup.py

* Update setup.py

* Update setup.py
2020-12-04 01:55:26 -08:00
Chen Sun 148dd8dcdb
chore(sdk): pin kfp-pipeline-spec version (#4748)
* pin kfp-pipeline-spec version

* kfp 1.1.1
2020-11-11 16:32:28 -08:00
Chen Sun 7cf620323f
chore(sdk): Use pipeline_spec proto from kfp-pipeline-spec package (#4745)
* Use pipeline_spec proto from kfp-pipeline-spec package

* update imports

* use pre-released kfp-pipeline-spec (temporarily)

* Revert "use pre-released kfp-pipeline-spec (temporarily)"

This reverts commit 77f2e9a39c.

* test_requires

* version

* make kfp a namespace package

* move to the top

* version rc0
2020-11-10 16:14:41 -08:00
Chen Sun a51380b065
chore(sdk): Add InputUri and, OutputUris placeholders in v2 (#4728)
* Fix bug where we missed injecting importer node

* moved files

* address review comments

* Add InputUriPlaceholder and OutputUriPlaceholder

* support uri placholder in v2

* lint

* test

* Preserve a test case with inputPath and outputPath usage.

* fix ut

* fix import and setup

* address comments
2020-11-09 11:37:58 -08:00
Chen Sun 5020fd1079
compiler for IR (#4529)
* Compile IR proto in setup.py

* compile to IR

* Fix importer node logic and lint

* cleanup and lint

* merge, undo setup.py change

* cleanup and lint

* remove currently unused code

* format _component_bridge.py

* cleanup and format

* cleanup

* upgrade protobuf in test

* restructure and test

* address review comments

* fix bug

* avoid f-strings formatting

* address review comments

* address review comments

* limit the primitive types to only int, double, and string.

* Fix test for python3.5

* use instance_schema instead of schema_title

* add v2 to setup.py

* address review comments

* move the tests closer to the code

* add more tests

* cleanup and linting

* add more tests

* fix bug on input paramter connection

* linting

* restructure tests

* fix python3.5 test failure

* support outputs.parameters placeholder

* remove pipeline decorator from v2.dsl
2020-10-13 17:13:54 -07:00
Abhishek Vilas Munagekar 5613db02bc
feat(sdk): Python components - Parse component input/output descriptions from the function docstring (#4512)
* cleanup imports

* add description to inputs and outputs

* update requirements

* add test

* improve component description

* update tests

* review changes: fix lint and requirements

* upgrade docstring-parser
2020-09-19 23:22:29 -07:00
Alexey Volkov 39975e3cde
SDK - Components - Temporary removed Kubernetes options from ComponentSpec (#4230)
* SDK - Components - Replaced Kubernetes options with generic launcher options

This reduces the schema size and makes the task launcher options more flexible.

* Removed the launcherOptions for now
2020-07-16 19:59:00 -07:00
Alexey Volkov f74fde251e
test(sdk): SDK - Added the mock package to the test requirements (#4132) 2020-07-02 01:24:46 -07:00
Yuan (Bob) Gong b12023ef3b
[Release] Various fixes to release script (#3918)
* Update kustomize/base/params.env

* fix

* kfp sdk requirement updated to kfp_api_server<2.0.0

* Fix major minor parsing

* Also fix cloudbuild.yaml
2020-06-05 13:32:21 +08:00
Alexey Volkov b63ad7e614
SDK - Removed the ArtifactLocation feature (#3517)
* SDK - Removed the ArtifactLocation feature

The feature was deprecated in v0.1.34 https://github.com/kubeflow/pipelines/pull/2326

* Removed the artifact_location sample
2020-04-23 00:49:44 -07:00
hongye-sun 3dbbb16903
update version to 0.5.0 (#3566) 2020-04-22 14:00:50 -07:00
Alexey Volkov b6bc24a014
SDK - Added pinned dependency snapshot (#3303)
* SDK - Added pinned dependency snapshot

* Downgraded zipp

The zipp package has dropped support for python3.5. https://zipp.readthedocs.io/en/latest/history.html#v2-0-0
https://github.com/jaraco/zipp/issues/28

* Fixing sample building in the backend Dockerfile

Installing SDK using pip.
Using SDK's requirements.txt.

* Enabled kubernetes v11

* Reverted the backend/Dockerfile for now

* Fixed the version of kfp-server-api
2020-03-30 00:53:53 -07:00
Ajay Gopinathan d6abac5e8d
Bump version to 0.3.0 (#3329)
* Bump version to 0.3.0

* Fix formatting

* More formatting fixes

* More formatting fixes

* update requirements.txt

* update version
2020-03-22 19:44:45 -07:00
Alexey Volkov 95aec25db4
SDK - Support kubernetes client v11 (#3319)
Fixes https://github.com/kubeflow/pipelines/issues/3275
2020-03-22 02:54:44 -07:00
Yuan (Bob) Gong f8a4521876
[SDK] Use new released kfp-server-api package (#3224)
* [SDK] Use new released kfp-server-api package

/assign @numerology

* Update setup.py

* Update setup.py

* Fix requirements.txt
2020-03-11 01:45:36 -07:00
Alexey Volkov 578d8de91d
SDK - Reduce python component limitations - no import errors for cust… (#3106)
* SDK - Reduce python component limitations - no import errors for custom type annotations

By default, create_component_from_func copies the source code of the function and creates a component using that source code. No global imports are captured. This is problematic for the function definition, since any annotation, that uses a type that needs to be imported, will cause error. There were some special provisions for
NamedTuple,  InputPath and OutputPath, but even they were brittle (for example, "typing.NamedTuple" or "components.InputPath" annotations still caused failures at runtime).

This commit fixes the issue by stripping the type annotations from function declarations.

Fixes cases that were failing before:

```python
import typing
import collections

MyFuncOutputs = typing.NamedTuple('Outputs', [('sum', int), ('product', int)])

@create_component_from_func
def my_func(
    param1: CustomType,  # This caused failure previously
    param2: collections.OrderedDict,  # This caused failure previously
) -> MyFuncOutputs: # This caused failure previously
    pass
```

* Fixed the compiler tests

* Fixed crashes on print function

Code `print(line, end="")` was causing error: "lib2to3.pgen2.parse.ParseError: bad input: type=22, value='=', context=('', (2, 15))"

* Using the strip_hints library to strip the annotations

* Updating test workflow yamls

* Workaround for bug in untokenize

* Switched to the new strip_string_to_string method

* Fixed typo.

Co-Authored-By: Jiaxiao Zheng <jxzheng@google.com>

Co-authored-by: Jiaxiao Zheng <jxzheng@google.com>
2020-02-24 20:50:48 -08:00
Renmin 10a4f55e3a Release bae654dc5c v0.1.40 (#2818)
* Updated component images to version bae654dc5c

* Updated components to version ff116b6f1a

* 0.1.40

* append old items

* fix line

Co-authored-by: renmingu <40223865+renmingu@users.noreply.github.com>
2020-01-09 01:33:46 -08:00
Alexey Volkov bae654dc5c SDK - Bumping the upper version of Kubernetes package (#2780) 2020-01-08 19:01:40 -08:00
hongye-sun 1b04983d96
update server and sdk version to 0.1.37 (#2701)
* update server and sdk version to 0.1.37

* update api package version to latest

* fix test error
2019-12-05 17:05:07 -05:00
Niklas Hansson 88b4757d5b SDK - Python support for arbitrary secret, similar to ".use_gcp_secret('user-gcp-sa')" (#2639)
* added new secret support

* updated the documentation and env settings

* updated after feedback

* added tests

* nameing issue fixed

* renamed test to follow unittest standard

* updated after feedback

* the new test after renaming

* added the test to main

* updates after feedback

* added licensce agreement

* removed space

* updated the volume named to be generated

* secret_name as volume name and updated test

* updated the file structure

* fixed build
2019-12-03 12:00:59 -08:00
Stephen Henderson c66120bda7 Adding missing kfp.cli.diagnose_me package to setup.py (#2610)
The kfp.cli.diagnose_me package was missing from the setup.py packages list and so wasn't included in the latest release pushed to pypi.org.
2019-11-15 00:59:42 -08:00
Alexey Volkov 5043ec78af SDK - Setup - Added cloudpickle to requirements (#2437)
* SDK - Setup - Added cloudpickle to requirements

* Specifying the exact cloudpickle version
2019-10-21 15:45:23 -07:00
Alexey Volkov 8025511c30 SDK - Added version (#2374) 2019-10-14 15:35:51 -07:00
IronPan dc5aab6687
Release 57d9f7f1cf (#2184)
* Updated component images to version 57d9f7f1cf

* Updated components to version e598176c02

* good version
2019-09-23 00:19:55 +08:00
Ning 06aeb0a052
update sdk versions (#2100) 2019-09-13 10:15:44 -07:00
Alexey Volkov 08104d6cf9 SDK - Containers - Build python container image based on current working directory (#1970)
* SDK - Containers - Build container image from current environment

* Removed the ability to capture the active python environment (as requested by @hongye-sun)

* Added the type hint and docstring to for the return type.

* Renamed `build_image_from_env` function to `build_image_from_working_dir`
as requested by @hongye-sun

* Explained the function behavior in the documentation.

* Removed extra empty line

* Improved caching by copying python files only after installing python packages

* Made test more portable

* Added support for specifying the base_image
`kfp.containers.default_base_image = ...`
The image can also be a callable returning the image name.

* Renamed `get_python_image` to `get_python_image_for_current_version`

* Switched the default base image to Google Deep Learning container image as requested by @hongye-sun
The size of this image is 4.35GB which really concerns me. The GPU image size is 6.45GB.

* Stopped importing kfp.containers.* into kfp.*

* Fixed test

* Fixed the regex string

* Fixed the type annotation style

* Addressed @hongye-sun feedback

* Removed the container image size warning

* Fixed import failure
2019-09-06 15:19:19 -07:00
Alexey Volkov 94b11de3a7 SDK - Compiler - Deprecated dsl-compile --package (#1941)
* SDK - Compiler - Deprecated dsl-compile --package

* Switched to the Deprecated library
2019-08-27 19:59:10 -07:00
hongye-sun 7ec56978b6 Release 151c5349f1 (#1916)
* Updated component images to version 151c5349f1

* Updated components to version a97f1d0ad0

* Update setup.py

* Update setup.py
2019-08-21 16:06:31 -07:00
Ajay Gopinathan 5bcc665928
Update Python SDK versions for release. (#1860) 2019-08-16 13:58:23 -07:00
IronPan 4e43750c9d
add reference name to resource reference API proto (#1781)
* add resource reference

* fix tests

* fix tests

* fix e2e test

* fix e2e

* fix test

* update api requirement

* fix tests

* Update job_api_test.go

* Update run_api_test.go

* Update setup.py

* Update deploy-kubeflow.sh

* fix tests

* Update deploy-kubeflow.sh
2019-08-13 03:15:11 -07:00
jingzhang36 80d16406f6 Increase KFP version in (1) sdk/python/setup.py (2) component_sdk/python/setup.py (3) manifests/base/kustomization.yaml (#1674)
* Increase KFP version in sdk/python/setup.py component_sdk/python/setup.py

* Increase kfp version in manifests/base/kustomization.yaml
2019-07-25 20:03:58 -07:00
hongye-sun 68cf384ad2 Adding kfp.cil to kfp setup.py. (#1666) 2019-07-24 17:31:51 -07:00
Ning cce52f4dfb update manifest and sdk version (#1617) 2019-07-12 14:39:04 -07:00
Riley Bauer 3882c306cd Update manifests for 0.1.23 (#1567)
* Updates KFP manifests for v0.1.23

* Bump version in sdk
2019-06-28 11:32:58 -07:00
Kevin Bache 5a5e39dc51 Release v0.22 (#1525)
* Updated component images to version d4960d3379

* Updated components to version d0aa15dfb3

* setup version inc
2019-06-20 15:28:35 -07:00
hongye-sun a39ae8eb77 KFP CLI (#1449)
* kfp CLI

* Add fire dependency

* Use click instead of fire

* Refactor the cli command groups.
2019-06-08 00:39:05 -07:00
Ning b6967d88aa add default value type checking (#1407)
* add default value type checking

* add jsonschema dependency

* fix unit test error

* workaround for travis python package installation

* add back jsonschema version

* fix sample test error in type checking sample

* add jsonschema in requirements such that sphinx works fine
2019-06-03 15:33:32 -07:00
Alexey Volkov 9a1d47a185 SDK - Capturing function dependencies when creating lightweight components (#1372)
* Transitively capturing code dependencies
Using cloudpickle.

* Got rid of func_type_declarations_code variable

* Extracted the function code extraction functions

* Improved support for capturing module-level dependencies

* Added test for capturing module-level dependencies

* Removed the _capture_function_code_using_source_copy function
As requested by Ning
2019-05-28 18:18:18 -07:00
Eterna2 91d941d6e5 [Feature] Supports parameterized S3Artifactory for Pipeline and ContainerOp in kfp package (#1064)
* kfp can declare custom artifact location in pipeline and containerop.

* Removed default artifact location

* Minor fixes
2019-05-14 19:48:20 -07:00
IronPan a2fd16e94e bump kfp version in sdk (#1330)
/assign @gaoning777
2019-05-14 13:49:18 -07:00
hongye-sun eb830cd73c Component 727c48c690 (#1280) 2019-05-03 11:20:40 -07:00
Alexey Volkov 467adb5a3b SDK - Separated the generated api client package (#1214)
* SDK - Separated the generated api client package

* Splitting the package build scripts

* Pinning the API client package version

* Moved import kfp_server_api to the top of the file

* Added the Mac OS X prerequisite install instructions

* Moved the build_kfp_server_api_python_package.sh script to the backend dir

* Updated the dependency version span
2019-04-29 15:49:37 -07:00
Alexey Volkov 7228ba1f0b Release b0147bdbed (#1238)
* Updated component images to version b0147bdbed

* Updated components to version e8524eefb1

* Updated the Python SDK version
2019-04-26 10:24:26 -07:00
Alexey Volkov 99c40a22cf Fix package version conflict (#1201)
* Fix package version conflict

* Fixing component_sdk requirements.txt
2019-04-22 17:52:06 -07:00
Ning 71325c3316 new kubernetes packages contain breaking change, thus fixing the version in the sample test image (#1159)
* new kubernetes packages contain breaking change, thus fixing the version

* also fixing the kubernetes version in the python sdk dependency

* fix bug
2019-04-14 21:36:00 -07:00
Ajay Gopinathan 9a11de78a7 Allow later versions of dependencies to be used with Python KFP package. (#1137) 2019-04-12 00:20:46 -07:00
Kevin Bache 52d7c7bd9e incremented app version (#1107) 2019-04-08 16:27:05 -07:00
hongye-sun 69b7fd31de
Support to send default service account jwt token for pipeline client. (#779)
* Support to send default service account jwt token for pipeline client.

* Configure auth for both kfp_run and kfp_experiment APIs
2019-02-11 11:26:38 -08:00
Alexey Volkov 02ab075cfe SDK - Update minimum Python version to 3.5.3 (#691)
This version has multiple bug fixes.
Last release available for Debian 9.
2019-01-22 18:43:35 -08:00
Alexey Volkov 83e9ffe5bc SDK/Components - Reworked the component model structures. (#642)
* Reworked the Component structures.
Rewrote parsing, type checking and serialization code.
Improved the graph component structures.
Added most of the needed k8s structures.
Added model validation (input/output existence etc).
Added task cycle detection and topological sorting to GraphSpec.
All container component tests now work.
Added some graph component tests.

* Fixed incompatibilities with python <3.7

* Added __init__.py to make the Travis tests work.

* Adding kubernetes structures to setup.py

* Addressed PR feedback: Renamed _original_names to _serialized_names

* Addressed PR feedback: Reduced indentation.

* Added descriptions for all component structures.

* Fixed a bug in ComponentSpec._post_init()

* Added documentation for ModelBase class and functions.

* Added __eq__/__ne__ and improved __repr__

* Added ModelBase tests
2019-01-09 15:51:34 -08:00
Tim Zaman 7c5c683713 Expose that the python API is Python3.5+ only (#616)
* Expose that the python API is Python3.5+ only

Adding these classifiers (many are the same as e.g. TensorFlow) makes sure pip/pypi index pick these up as being 3.5+ only, so that developers on Python 2 are not suprised when it fails on Python 3 syntax (e.g. typehints are only py 3.5+).

* Update setup.py

* Update setup.py

* Update setup.py
2019-01-07 22:33:12 -08:00
IronPan 4a05836ed6 Expose pipeline/job API through setup.py (#634)
This is a follow up PR after https://github.com/kubeflow/pipelines/pull/628
2019-01-04 20:09:32 -08:00
Bradley Jiang 9d19e0a902 Pin down GCS python package version. 2018-11-07 09:59:11 -08:00
Bradley Jiang d110eb8fdb Make kubernetes a dependency of kfp package. 2018-11-07 09:43:46 -08:00
qimingj 458c817d83 Add %%docker magic to jupyter kernel. It helps submitting a docker build job more easily with one cell. (#72) 2018-11-06 10:55:56 -08:00
Pascal Vicaire 633e2ddcc8 Initial commit of the kubeflow/pipeline project. 2018-11-02 14:02:31 -07:00