Commit Graph

91 Commits

Author SHA1 Message Date
Alexey Volkov b12d5d8f8e SDK/Components - Added /data to the generated file paths (#663)
This is needed for the future storage system based on volume mounts:
If outputs were written to files in the same dir (e.g. /outputs/out1.txt and /outputs/out2.txt), then we cannot separate them and mount to the downstream task containers independently.
2019-01-15 18:01:40 -08:00
Alexey Volkov fd282d67cd SDK/Components - Simplified _create_task_factory_from_component_spec function (#662) 2019-01-14 18:02:16 -08:00
Alexey Volkov 4b5c031514 SDK/Tests - Fixed the output ordering instability in tests (#664) 2019-01-10 19:20:43 -08:00
Alexey Volkov b8f5348fb3 SDK/Components - Renamed serialized command-line argument tokens (#659) 2019-01-10 00:49:37 -08:00
Alexey Volkov 786544b06b SDK - Fixed the unittest script (#556) 2019-01-09 18:43:46 -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
Ning d3c4add0a9 DSL refactor (#619)
* add comments

* relocate functions in compiler to aggregate similar functions; move _build_conventional_artifact as a nested function

* reduce sanitize functions into one in the dsl.

* more comments

* move all sanitization(op name, param name) from dsl to compiler

* sanitize pipelineparam name and op_name; remove format check in pipelineparam

* remove unit test for pipelineparam op_name format checking

* fix bug: correctly replace input in the argument list

* fix bug: replace arguments with found ones

* Sanitize the file_output keys, Matches the param in the args/cmds with the whole serialized param str, Verify both param name and container name

* loosen the containerop and param name restrictions
2019-01-08 20:00:17 -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
qimingj 875efea1f9 Support replacable arguments in command as well (besides arguments) in container op. (#623)
* Support replacable arguments in command as well (besides arguments) in container op.

* Fix components builder.

* Fix tests.

* Follow up CR comments.

* Fix test.
2019-01-07 07:57:36 -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
IronPan 59124887d9 Generate pipeline and job python client as part of SDK (#628)
So people can use python to CRUD pipeline or job
2019-01-04 14:11:47 -08:00
qimingj 410f9b979f Update sample notebook to clean up deployed models. (#622)
* Update sample notebook to clean up deployed models.

Update SDK client to return correct links in local Jupyter with user's own proxy connection.

* Fix sample tests.
2019-01-04 13:07:30 -08:00
qimingj 1c689ed70d First step to bring back CMLE sample. (#599)
* First step to bring back CMLE sample.

Set GCP credential for gcloud. Do not export TPU Model because a) Serving does not need TPU. b) Workaround a CMLE 1.9 issue.

* Follow up on CR comments.

* Add comments.
2019-01-02 17:58:44 -08:00
Ning 85c6413a2e Refactor Python SDK (#568)
* add some comments

* remove unused import; add license to dsl_bridge

* move_convert_k8s_obj_to_dic from compiler to k8s_helper

* move unit test
2018-12-20 09:51:09 -08:00
Ning b313e4060c remove duplicate volumes (#558)
* remove duplicate volumes

* add a todo
2018-12-18 10:39:43 -08:00
Alexey Volkov cdfedebf20 Renamed dsl/_component.py to dsl/_python_component.py (#510) 2018-12-14 14:27:04 -08:00
qimingj 19e7ff2995 Support Kaniko job in a outside-cluster jupyter. (#535)
* Make kaniko job working in a outside-cluster jupyter.

* Also support in-cluster config.
2018-12-13 00:47:51 -08:00
qimingj 6b315d4693 Change "namespace" param to "host" in kfp client so we can use Jupyter outside cluster. (#529)
* Change "namespace" param to "host" in kfp client so we can use Jupyter outside cluster.

* Fix tests.
2018-12-12 23:36:18 -08:00
Alexey Volkov 17582a8fab SDK/Components - Made component search locations configurable (#519)
* SDK/Components - Made component search locations configurable

* Raise proper error on existing, but malformed components instead of saying the component was not found.
Component name must be non-empty.
Addressed PR feedback.
2018-12-12 17:08:51 -08:00
Ning 886e113f78 Improve get_experiment and list_runs in the python sdk (#508)
* add get_experiment_id and list_runs_by_experiment

* offer only one get_experiment function

* return experiment body instead of id

* simply codes

* simply code 2

* remove experiment_id check in the while loop

* minor bug
2018-12-11 22:02:24 -08:00
Alexey Volkov e64a76656b SDK/Components - Do not crash on non-hashable objectsApparently Python's `dict.get` throws exception when it thinks that the object is not suitable for key. (#511) 2018-12-11 00:05:51 -08:00
Alexey Volkov fa1886c39d SDK/Components - Allow dict type spec (#490) 2018-12-08 02:29:37 -08:00
nealgao ad1950b8e6 Add notebook sample test: tfx sample (#470)
* add notebook sample tests for tfx

* parameterize component image tag

* parameterize base and target image tags

* install tensorflow package for the notebook tfx sample test

* bug fixes

* start debug mode

* fix bugs

* add namespace arg to check_notebook_results, copy test results to gcs, fix minor bugs
add CMLE model deletion

* install the correct KFP version in the notebook; parameterize deployer model name and version

* fix CMLE model name bug

* add notebook sample test in v2

* add gcp sa in notebook tfx sample and shutdown debug mode

* import kfp.gcp
2018-12-07 10:49:30 -08:00
hongye-sun 55e18269c3 support tpu settings in dsl (#491)
* support tpu settings in dsl

* fix issues from review comment
2018-12-06 21:55:36 -08:00
Alexey Volkov d9c133f7f7 SDK/Components/PythionContainerOp - Make the local output path configurableThis is part of a bigger effort to make all output locations manageable in preparation for storage system. (#424) 2018-12-04 19:56:56 -08:00
qimingj 1f8846cf20 Sanitize inputs from SDK when submitting run. (#466) 2018-12-04 16:25:21 -08:00
nealgao 632370c862 import bug (#463) 2018-12-04 12:30:59 -08:00
Alexey Volkov 800bd0249b SDK/GCP - Replaced default_gcp_op with task.apply(use_gcp_secret) (#430) 2018-12-03 18:02:30 -08:00
Alexey Volkov 96ec194260 SDK/Components - Removed outputs from task factory function signature (#388)
This realizes the outputs handling roadmap and solves problems with input and output name clashes.
2018-12-03 14:52:32 -08:00
Alexey Volkov d355a15aa7 SDK - Improve the python package build (#364)
* Make the script fail on error.
* Support relative output paths: `./build.sh kfp.tar.gz`
* Support default output path (`./kfp.tar.gz`): `./build.sh`
2018-12-03 13:59:21 -08:00
Alexey Volkov e0a2cf66d2 SDK/PythonContainer - Compiling pipelines without needing kubernetes (#442) 2018-12-03 13:14:08 -08:00
Alexey Volkov b0461f51ff SDK/DSL - Added support for 5 more conditional operations (#309) 2018-12-03 12:33:24 -08:00
Alexey Volkov e06dc88316 SDK/Components - Renamed container.arguments to container.args (#437)
This aligns us with Kubernetes spec
2018-12-03 11:02:15 -08:00
Alexey Volkov 8a9e205d05 SDK/Components/PythonContainerOp - Simplified GCSHelper by extracting duplicate code (#210)
* Simplified GCSHelper by extracting duplicate code

* Revert to using get_bucket for now
As per  @gaoning777's request
2018-12-02 11:59:15 -08:00
IronPan 9d38f717b1 DSL - return self for .after() (#435) 2018-11-30 18:40:44 -08:00
Alexey Volkov 55e39eaf44 Testing - Fix Travis tests (SDK/Components) (#432)
See https://github.com/kubeflow/pipelines/issues/431
2018-11-30 15:50:51 -08:00
Alexey Volkov 4f74ae3c0c SDK/Client - Removed import six (#425) 2018-11-30 15:03:59 -08:00
Alexey Volkov 98cc6ee42d SDK/Components/PythonContainerOp - Switch from dict to ComponentSpec (#396) 2018-11-30 14:14:20 -08:00
Alexey Volkov 9110296e57 SDK/Components - Support for optional inputs (#214)
* Renamed "required" to "optional"

* Added support for optional inputs

* Added tests for optional inputs. "If then *" tests now also work.
2018-11-30 13:30:09 -08:00
Chris Van Pelt 26fd724ec5 Fix for k8s dict parsing (#411)
* Add support for minio artifacts

* Add new tests for parity

* Fix for sdk env bug

* improved test
2018-11-30 11:44:38 -08:00
IronPan 537357ac8f Propagate secret to kaniko (#423)
* propagate secret to kaniko spec

* update name
2018-11-29 22:39:32 -08:00
qimingj 0b7120c322 Now pipeline function takes direct default values rather than dsp.PipelineParam. (#110)
* Now pipeline function takes direct default values rather than dsp.PipelineParam. It simplifies the sample code a lot.

* Remove extraneous parenthesis.

* Follow up CR comments.

* Change Dockerfile (not done).

* Fix dockerfile.

* Fix Dockerfile again.

* Remove unneeded installation of packages in Dockerfile.
2018-11-26 17:13:55 -08:00
nealgao cc38ca063a remove fire dependency in the component image build (#384) 2018-11-26 16:31:28 -08:00
IronPan 6003a63a60 move default gcp op to dsl/ (#376) 2018-11-26 12:50:18 -08:00
hongye-sun 486d43ddfb Add support for nvidia gpu limit (#346)
* Add support for nvidia gpu limit

* Expose resource limits, requests and nodeSelector to ContainerOp

* Fix test data

* Add explicit set_gpu_limit function

* Fix logical bug
2018-11-21 17:49:42 -08:00
google inc 33f191f308 mount gcp credentials for kaniko worker (#343)
* mount gcp credentials for kaniko worker

* update test
2018-11-20 23:33:43 -08:00
nealgao 6937e780c3 refactor component build codes (#260)
* refactor codes

* change name handler to handle
2018-11-20 20:03:34 -08:00
Alexey Volkov 325a44661c SDK/Components/PythonContainerOp - Fixed string escaping warning (#208)
W1401:Anomalous backslash in string: '\w'. String constant might be missing an r prefix.
2018-11-20 16:28:51 -08:00
nealgao 5908496852 fix bug for the component build with requirements (#320)
* fix bug for the component build with requirements

* fix unit test failure
2018-11-20 15:43:28 -08:00
Alexey Volkov dd0bd45aa3 SDK/Components - Renamed DockerContainer spec to to Container (#323) 2018-11-20 12:47:49 -08:00