Commit Graph

1335 Commits

Author SHA1 Message Date
Ning e90a334758 fix bug (#1048) 2019-03-26 17:12:47 -07:00
Ning 554731e478 dsl generate zip file (#855)
* dsl generate zip file

* minor fix

* fix zip read in the unit test

* update sample tests

* dsl compiler generates pipeline based on the input name suffix

* add unit tests for different output format

* update the sdk client to support tar zip and yaml

* fix typo

* fix file write
2019-03-26 15:14:50 -07:00
Ning 8c09090985 Support recursions in a function (#1014)
* add a While in the ops group

* deepcopy the while conditions when entering and exiting

* add while condition resolution in the compiler

* define graph component decorator

* remove while loop related codes

* fixes

* remove while loop related code

* fix bugs

* generate a unique ops group name and being able to retrieve by name

* resolve the opsgroups inputs and dependencies based on the pipelineparam in the condition

* add a recursive ops_groups

* fix bugs of the recursive opsgroup template name

* resolve the recursive template name and arguments

* add validity checks

* add more comments

* add usage comment in graph_component

* add unit test for the graph opsgraph

* refactor the opsgroup

* add unit test for the graph_component decorator

* exposing graph_component decorator

* add recursive compiler unit tests

* fix the bug of opsgroup name
adjust the graph_component usage example
fix index bugs
use with statement in the graph_component instead of directly calling
the enter/exit functions

* add a todo to combine the graph_component and component decorators
2019-03-26 14:17:18 -07:00
Ning 1c4f9eb431
exposing type checking (#1022)
* exposing types under dsl.types
2019-03-26 09:33:16 -07:00
Alexey Volkov 1b1c2f6b9c SDK - Simplified type compatibility tests (#1004)
Simplified the type compatibility tests by removing component inputs/outputs and properties that are not required for the tests to work.

Renamed (+split) some of the tests:
`test_type_check_all_with_types` -> `test_type_compatibility_check_for_simple_types` + `test_type_compatibility_check_for_types_with_parameters`
`test_type_check_with_lacking_types` -> `test_type_compatibility_check_when_input_type_is_missing` + `test_type_compatibility_check_when_argument_type_is_missing`
`test_type_check_with_inconsistent_types_property_value` -> `test_fail_type_compatibility_check_when_type_property_value_is_different`
`test_type_check_with_inconsistent_types_type_name` -> `test_fail_type_compatibility_check_when_simple_type_name_is_different + test_fail_type_compatibility_check_when_parametrized_type_name_is_different`
`test_type_check_with_consistent_types_nonnamed_inputs` -> `test_type_compatibility_check_when_using_positional_arguments`
`test_type_check_with_inconsistent_types_disabled` ->` test_type_compatibility_check_not_failing_when_disabled`
`test_type_check_with_openapi_shema` -> `test_type_compatibility_check_for_types_with_schema`
`test_type_check_ignore_type` -> test_fail_type_compatibility_check_for_types_with_different_schemas` + `test_type_compatibility_check_not_failing_when_type_is_ignored`

Added two disabled tests:
`test_type_compatibility_check_when_argument_type_has_extra_type_parameters`
`test_fail_type_compatibility_check_when_argument_type_has_missing_type_parameters`
2019-03-25 20:17:16 -07:00
Alexey Volkov 9b804688d3 Added the metadata property to ComponentSpec (#1023)
The `metadata` section contains the `annotations` and `labels` dictionaries.
2019-03-23 16:27:05 -07:00
Alexey Volkov fac06e9a87 SDK/DSL/Compileer - Fixed handling of empty pipeline name (#1009)
Fixes https://github.com/kubeflow/pipelines/issues/825
2019-03-21 15:44:18 -07:00
Alexey Volkov 07aa5db70f Fixed bug in docstring construction (#1012) 2019-03-21 14:57:36 -07:00
Alexey Volkov 665d088030 Added the component name to the docstring (#976) 2019-03-19 21:50:24 -07:00
hongye-sun dcdff39243 Add optional pipeline_id to run_pipeline api (#968) 2019-03-19 21:04:22 -07:00
Ning c6ca1ac38e
well-defined parameter types (#978)
* remove GCSPath fields to avoid artifact type confusion
change the type json schema field name to openAPIV3Schema
* fix unit tests; add unit test for openapishema property
* add ignore_type in pipelineparam
* change the names in the artifact types to avoid confusion with the parameter types
* based on the google python style guide, change the camel case to lower case with underscores
2019-03-19 17:38:13 -07:00
Ning 2accf4180a
Add unit tests pipelineparam (#975)
* add unit test to the pipelineparam with types
* create TypeMeta deserialize function, add comments
* strongly typed pipelineparamtuple
* addressing pr comments
2019-03-18 18:07:36 -07:00
Ning 754db1f724
Fix sample test failure because of the type information in the pipelineparam (#972)
* fix bug: op_to_template resolve the raw arguments by mapping to the argument_inputs but the argument_inputs lost the type information

* fix type pattern matching

* convert orderedDict to dict from the component module
2019-03-15 13:49:21 -07:00
rakelkar dd6e9a82ee helper fn to add az secrets to container (#954)
* helper fn to add az secrets to container

* fix indent

* add test for az extensions

* rename file from az to azure
2019-03-14 01:20:23 -07:00
Ning c829115574 Add type check (#938)
* add core types and type checking function

* fix unit test bug

* avoid defining dynamic classes

* typo fix

* add component metadata format

* add a construct for the component decorator

* add default values for the meta classes

* add input/output types to the metadata

* add from_dict in TypeMeta

* small fix

* add unit tests

* use python struct for the openapi schema

* add default in parameter

* add default value

* remove the str restriction for the param default

* bug fix

* add pipelinemeta

* add pipeline metadata

* ignore annotation if it is not str/BaseType/dict

* update param name in the check_type functions
remove schema validators for GCRPath, and adjust for GCRPath, GCSPath
change _check_valid_dict to _check_valid_type_dict to avoid confusion
fix typo in the comments
adjust function order for readability

* remove default values for non-primitive types in the function signature
update the _check_valid_type_dict name

* pass metadata from component decorator and task factory to containerOp

* pass pipeline metadata to Pipeline

* fix unit test

* typo in the comments

* move the metadata classes to a separate module

* fix unit test

* small change

* add __eq__ to meta classes
not export _metadata classes

* nothing

* fix unit test

* unit test python component

* unit test python pipeline

* fix bug: duplicate variable of args

* fix unit tests

* move python_component and _component decorator in _component file

* remove the print

* change parameter default value to None

* add functools wraps around _component decorator

* TypeMeta accept both str and dict

* fix indent, add unit test for type as strings

* do not set default value for the name field in ParameterMeta, ComponentMeta, and PipelineMeta

* add type check in task factory

* output error message

* add type check in component decorator; move the metadata assignment out of the containerop __init__ function

* fix bug; add unit test

* add more unit tests

* more unit tests; fix bugs

* more unit tests; fix bugs

* add unit tests

* more unit tests

* add type check switch; add unit tests

* add compiler option for type check

* resolving pr comments

* add unit test for pipeline param check with component types; fix the bug; also fix the bug when there are not a single return annotations
2019-03-11 11:22:12 -07:00
Alexey Volkov 7ce03f07d4 SDK/DSL/Compiler - Fixed compilation when using ContainerOp.after (#943)
Fixes https://github.com/kubeflow/pipelines/issues/941
2019-03-07 18:47:30 -08:00
Alexey Volkov 6d080c70f9
Added support for loading zip-packed components (#931)
The zip-packed components are supported in all load_component APIs:
`kfp.components.load_component`
`kfp.components.load_component_from_file`
`kfp.components.load_component_from_url`
`kfp.components.ComponentStore.load_component`
2019-03-06 23:00:03 -08:00
Alexey Volkov fa02e750da SDK/Components - Added naming.generate_unique_name_conversion_table (#716)
generate_unique_name_conversion_table replaces _make_name_unique_by_adding_index and simplifies code in several places.
2019-03-06 15:12:58 -08:00
Alexey Volkov b68fbbd897
Fixed small bug in DSL code that generates unique names for ops (#923)
Before the fix it would generate names as follows:
name
name-2
name-2-3

After the fix:
name
name-2
name-3
2019-03-06 14:24:41 -08:00
Ning 974d602b74
Pass meta to containerop and pipeline (#905)
pass metadata from python conf to containerop and the pipeline
2019-03-06 13:42:23 -08:00
Ning 05b1a07740 Add python conf to the metadata (#894)
* add core types and type checking function

* fix unit test bug

* avoid defining dynamic classes

* typo fix

* add component metadata format

* add a construct for the component decorator

* add default values for the meta classes

* add input/output types to the metadata

* add from_dict in TypeMeta

* small fix

* add unit tests

* use python struct for the openapi schema

* add default in parameter

* add default value

* remove the str restriction for the param default

* bug fix

* add pipelinemeta

* add pipeline metadata

* ignore annotation if it is not str/BaseType/dict

* update param name in the check_type functions
remove schema validators for GCRPath, and adjust for GCRPath, GCSPath
change _check_valid_dict to _check_valid_type_dict to avoid confusion
fix typo in the comments
adjust function order for readability

* remove default values for non-primitive types in the function signature
update the _check_valid_type_dict name

* typo in the comments

* move the metadata classes to a separate module

* fix unit test

* add __eq__ to meta classes
not export _metadata classes

* fix unit test

* fix bug: duplicate variable of args

* move python_component and _component decorator in _component file

* remove the print
2019-03-05 22:14:02 -08:00
Alexey Volkov 63202ea9fd Configure artifact name and path separately (#900) 2019-03-05 18:16:00 -08:00
Ning f6acbadadd
Add component metadata (#891)
* add component metadata
2019-03-05 16:02:05 -08:00
Ning 02ab7b7db2 add core types and type checking function (#886)
* add core types and type checking function

* fix unit test bug

* avoid defining dynamic classes

* typo fix

* use python struct for the openapi schema

* update param name in the check_type functions
remove schema validators for GCRPath, and adjust for GCRPath, GCSPath
change _check_valid_dict to _check_valid_type_dict to avoid confusion
fix typo in the comments
adjust function order for readability
2019-03-05 09:48:00 -08:00
hongye-sun f9cea6d793 Create experiment only if it's not exist. (#892)
* Create experiment only if it's not exist.

* Skip error if experiment is not found.

* Use try catch to bypass the not found error.
2019-03-02 11:42:50 -08:00
Alexey Volkov 5ab368ac10 Added support for default values to Lightweight python components (#890) 2019-03-01 14:51:18 -08:00
Alexey Volkov f5bdf2474e Added support for default values to load_component (#889) 2019-03-01 14:12:32 -08:00
Alexey Volkov 85738cbaaf Passing the environment variables to ContainerOp (#877)
When the DSL bridge code was written, ContainerOp did not support env, so we did not pass it. Now we're adding the passing code.
Added test that chacks that the env variables get to the ContainerOp.
2019-02-28 19:29:54 -08:00
Adhita Selvaraj 9010329c7b Simplify volume usage with containerop (#783)
change function name to mount_pvc
2019-02-27 19:00:16 -08:00
Ning 81d7a4eec2 extract the pipelineparam deserialize function (#841)
* extract the pipelineparam deserialize function

* typo fix

* adjust extract_param to accept a list of strings

* convert arg to string

* bug fix, add unit tests
2019-02-25 14:44:09 -08:00
Ning a6763b9599 component build support for both python2 and python3 (#730)
* component build support for both python2 and python3

* add sample test

* remove the annotations for python2 component build

* add pathlib for python2 component build

* fix component build unit test

* fix bug in the dockerfile generator

* remove exist_ok in path.mkdir to make python2 compatible

* adjust unit test

* remove pathlib dependency for python2 component build

* remove the pathlib codes in python3 component build, but use python2 code instead; add a todo to create a new sample
2019-02-25 12:56:19 -08: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
Ning 9ebbaa313d support pipeline level imagepullsecret in DSL (#745)
* support pipeline level imagepullsecret in DSL

* use kubernetes native input parameter for imagepullsecrets

* expose a module level function to configure the pipeline settings for the current default pipeline
2019-02-05 13:16:43 -08:00
Alexey Volkov d15c72470f SDK/Components - Improved error when type checking fails in constructor (#732) 2019-01-25 14:44:15 -08:00
Alexey Volkov edf9b5471a SDK/Components - convert_object_to_struct now uses __init__ to get field list (#733)
This stops serialization of any additional attributes set on an object
2019-01-24 20:01:23 -08:00
Alexey Volkov 8c4f5de1f7 SDK/Components - Command line args can only be strings or placeholders (#711)
Ultimately, command line is an array of strings. Component yaml files should have the arguments as strings instead of Python SDK doing conversion sometimes.
2019-01-24 19:13:50 -08:00
Alexey Volkov 4457e7e940 SDK/Components - More meaningful error when trying to convert graph component to ContainerOp (#710) 2019-01-24 18:15:07 -08:00
Alexey Volkov a53cb586fc SDK/Components - Added _naming._convert_to_human_name function (#715)
* SDK/Components - Moved naming-related functions to _naming.py

* SDK/Components - Added _naming._convert_to_human_name function
2019-01-24 16:07:46 -08:00
Alexey Volkov 32475bfafb SDK/Components/Python - Improved Python2 compatibility (#718)
Improved Python2 compatibility in Lightweight python components
2019-01-24 14:42:03 -08:00
qimingj 3b3a15e16a Add "set_retry()" on ContainerOp. (#723)
* Add "set_retry()" on ContainerOp.

* Follow up on CR comments.

* Update docstring.

* Increase retry times for test.

* Fix test.
2019-01-23 17:35:34 -08:00
Alexey Volkov 9b4088626c SDK/Components/Python - Made the typing.NamedTuple import optional (#717)
Now it's only imported if the return type is NamedTuple.
2019-01-23 16:31:13 -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 0c92b83013 SDK - Removed stray debug pring from tests (#701) 2019-01-22 16:28:35 -08:00
Ajay Gopinathan 578e8231d0 Update all Pipelines CRD versions to v1beta1. (#681) 2019-01-17 19:35:51 -08:00
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
Yang Pan 150ff9c085 Add default_gcp_op (#314)
* switch set() to add() for better inheritance.

* return self for container op initialization methods to allow chaining the initialization

* add default gcp op

* update

* Update sdk/python/kfp/dsl/components/default_gcp_op.py

Co-Authored-By: IronPan <yangpa@google.com>

* Update default_gcp_op.py
2018-11-19 18:33:39 -08:00
Yang Pan f28a9891d2 return self for container op initialization methods to allow chaining the construction (#313)
* switch set() to add() for better inheritance.

* return self for container op initialization methods to allow chaining the initialization

* comment
2018-11-19 16:46:55 -08:00
Yang Pan dfcf92bea8 switch set() to add() for better inheritance. (#312) 2018-11-19 15:18:56 -08:00
Alexey Volkov 906ad680ed SDK/DSL/Compiler - Improved compilation of dsl.Conditional - UX support done (#177)
* Fixed compilation of dsl.Conditional
The compiler no longer produced intermediate steps.

* Got rid of _create_new_groups

* Changed the sub_group.type check

* Update frontend handling of graphs (#293)

* Updates the frontend to correctly parse the new format of conditional pipelines

* WIP - Assume tasks and templates don't share names

* Greatly simplifies graphing of conditional and non-conditional pipelines

* Adds/updates StaticParser tests

* Give nodes unique names
2018-11-19 14:01:10 -08:00
Yang Pan 9225ac6945 remove duplication (#233) 2018-11-19 12:26:49 -08:00
nealgao b39435765d configurable namespaces in sample test and python SDK (#306)
* configurable namespaces in sample test and python SDK

* update run_test.sh

* fix a typo
2018-11-17 00:31:05 -08:00
Yasser Elsayed 0f2e9a3ca8 Job link -> run link (#268) 2018-11-16 22:25:32 -08:00
nealgao 7d811bff0a add support for dependencies in the component image building (#219)
* add requirement to component image build

* add unit test for DependencyVersion

* add unit tests, fix bugs

* revert some unit test change

* include the package name inside the VersionedDependency, enable the unit test for the component builder

* disable the component image build, this is done in another PR

* update the version name to dependency

* delete unuseful tests and add more useful unit tests

* add unit tests

* fix some unit tests

* fix bug in DependencyHelper
2018-11-16 21:49:14 -08:00
Alexey Volkov 6a37388a79 SDK/Components/Python - Removed python_op in favor of python_component (#85)
* SDK/Components/Python - Removed python_op in favor of python_component

* Added test for python_component + func_to_container_op.
* dsl.PythonComponent class is removed, because the metadata is now properly stored in the function object itself.
* build_python_component now optionally accepts base_image and no longer requires the decorator (but can use decorator's metadata).
* Made staging_gcs_path optional since it's only needed when build_image == True
* Added more validation
* Added description and parameter help to python_component

* Fixed the pipeline path string after merge.

* Addressed the PR comments.
Added more detailed explanation of base_image selection to the docstring.

* Removed extra empty lines
2018-11-16 19:32:08 -08:00
Yang Pan a47eb10558 Add volume, volumemount and env to container op (#300)
* [WIP] change deployment platform to gcp

* debug

* revert test

* add volume

* update test

* to list

* fix

* to list

* to list

* to list

* to list

* stage

* update

* update

* Undid style changes

* address comments

* update comments
2018-11-16 18:36:38 -08:00
nealgao 6a5639295f configure logger (#292) 2018-11-15 16:16:53 -08:00
nealgao 263812b070 enable component build unit test (#228)
* enable component build unit test

* minor fix
2018-11-15 15:20:51 -08:00
Alexey Volkov 0c6fef8870 SDK/Components - Fixes and more tests (#213)
* Fixed string boolean handling in if condition

* Fixed bug in isPresent

* Fixed list expansion when an item expands to a list

* Renamed two tests

* Fixed resolving primitive types (yaml supports and decodes them)

* Added test that checks handling arguments of all yaml types

* Added tests for handling true and false booleand and string literals in conditional expressions
2018-11-15 14:26:15 -08:00
Yang Pan 7e34b12e8d Add gcp secret parameter to container op (#261)
* add secret

* add secret to contianer op

* update comments

* address comments

* update logic

* fix
2018-11-15 10:06:14 -08:00
nealgao b7440570b0 minor fixes (#217)
* minor fixes

* remove the yaml output
2018-11-12 18:01:45 -08:00
Alexey Volkov 09e4146e8c SDK/Components - Switched the generated inputs/outputs structure from dict to list (#173) 2018-11-10 15:17:26 -08:00
Alexey Volkov 2a7aeee184 SDK/Components - Removed the old argument syntax (#168) 2018-11-10 14:42:56 -08:00
Alexey Volkov 199a962e42 SDK - Relative imports (#156)
Made all SDK import relative so that they files always refer to the sibling files instead of the installed package. This makes debugging and development easier since you can be sure the correct files are used.
2018-11-10 13:56:12 -08:00
Alexey Volkov 43b2381d3b SDK/DSL-compiler - Compile without temporary files (#172)
This also avoids writing, closing and then reading again the same temporary file which is not always supported.
2018-11-10 12:51:29 -08:00
Alexey Volkov 74f2a139db SDK/Tests - Removed sys.path manipulations. (#151)
Also fixed compilation path.
2018-11-08 20:15:09 -08:00
nealgao e639a361de add todos for the image tag update for new releases (#138) 2018-11-08 17:34:48 -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
Alexey Volkov 13c65151fe Removed mentions of ark7 in tests (#111) 2018-11-06 22:23:55 -08:00
qimingj bb62b321a5 Fix an issue that %%docker doesn't work. (#119) 2018-11-06 20:06:58 -08:00
nealgao f25d32b801 image tag update for release (#114)
* update image tag for new releases

* add more

* delete the accidentaly added sample
2018-11-06 18:12:13 -08:00
Alexey Volkov 7e4569324b SDK/DSL/Compiler - Reverted fix of dsl.Condition until the UI is ready. (#94) 2018-11-06 12:33:22 -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
Alexey Volkov e6a4c9ff73 mlp -> kfp.dsl (#88) 2018-11-06 09:40:07 -08:00
Alexey Volkov 98e4d2f881 SDK/DSL/Compiler - Fixed compilation of dsl.Condition (#28)
* Fixed compilation of dsl.Conditional
The compiler no longer produced intermediate steps.

* Got rid of _create_new_groups

* Changed the sub_group.type check

* Fix tfx name bug in the tfma sample test (#67)

* fix tfx name bug

* update release build for the data publish
2018-11-06 09:26:41 -08:00
Alexey Volkov 2e3b328468 SDK/Tests/Components - Improve temporary file handling (#37)
* Improve temporary file handling in python op tests

* More small temp path fixes

* Fix tfx name bug in the tfma sample test (#67)

* fix tfx name bug

* update release build for the data publish
2018-11-05 23:44:10 -08:00
Alexey Volkov 06f8821abf Components - Python - Stopped using the Fire library (#40) 2018-11-05 17:58:11 -08:00
Alexey Volkov 5409792183 SDK/Components - Switching to map-based syntax for the arguments. (#29)
* Switching to map-based syntax for the arguments.

The list-based syntax is going to be deprecated.

* Switched to map-style arguments in _func_to_component_spec

* Updated testdata
2018-11-05 14:59:23 -08:00
qimingj e77a91f85a
Merge pull request #41 from kubeflow/avolkov/Correct-argument-types
SDK/Tests/Components - Corrected test argument types
2018-11-05 14:39:54 -08:00
Alexey Volkov fa921babac
Using the float comparison 2018-11-05 14:16:25 -08:00
Alexey Volkov 270c0c5f5c SDK/Tests/Components - Corrected test argument types 2018-11-05 01:46:12 -08:00
Alexey Volkov 6f4386884c Components - Removed debug print 2018-11-04 23:40:50 -08:00
Pascal Vicaire 9ab085ab41 Merge remote-tracking branch 'origin/master' into vicaire/updateImageVersions 2018-11-02 18:47:06 -07:00
Pascal Vicaire 67b011f228 Upgrading the container versions to 0.0.42, the version of the first release of kubeflow/pipelines. 2018-11-02 16:57:37 -07:00
Pascal Vicaire d18f37785d Updating references to the project repository to kubeflow/pipelines. 2018-11-02 15:06:54 -07:00
Pascal Vicaire 633e2ddcc8 Initial commit of the kubeflow/pipeline project. 2018-11-02 14:02:31 -07:00