Commit Graph

1350 Commits

Author SHA1 Message Date
Alexey Volkov c676b838ef SDK - Lightweight - Added package installation support to func_to_container_op (#2245)
* SDK - Refactoring - Passing the parameters explicitly in python_op.
This helps avoid problems when new parameters are added.

* SDK - Components - Added package installation support to func_to_container_op

Example:
```python
op = func_to_container_op(my_func, packages_to_install=['pandas==0.24'])
```

* Make pip quieter

* Added the test_packages_to_install_feature test
2019-09-30 19:13:32 -07:00
Alexey Volkov 646c2890de SDK - Components - Fixed small bugs in graph component resolving (#2269)
Fixed accessing inputs and outputs without checking for None.
Fixed case where the default value of graph component input has to be passed to component as an argument.
2019-09-30 18:33:32 -07:00
Alexey Volkov 06f9322a78 SDK - Lightweight - Convert the names of file inputs and outputs (#2260)
* SDK - Lightweight - Convert the names of file inputs and outputs

Removing the "_path" and "_file" suffixes from the names of file inputs and outputs.
Problem: When accepting file inputs (outputs), the function inside the component receives file paths (or file streams), so it's natural to call the function parameter "something_file_path" (e.g. model_file_path or number_file_path).
But from the outside perspective, there are no files or paths - the actual data objects (or references to them) are passed in.
It looks very strange when argument passing code looks like this: `component(number_file_path=42)`. This looks like an error since 42 is not a path. It's not even a string.
It's much more natural to strip the names of file inputs and outputs of "_file" or "_path" suffixes. Then the argument passing code will look natural: "component(number=42)"

* Removed the _FEATURE_STRIP_FILE_IO_NAME_PARTS feature switch
2019-09-30 16:35:32 -07:00
Alexey Volkov 2f0f1e47a2 SDK - Components - Stop setting component_ref.name to component name (#2265)
Problem: It's hard to distinguish components loaded by name (e.g. using `ComponentStore`) from components that were never loaded (e.g. just created from python function).
`component_ref.name` was previously being set, since it was a required parameter.
`component_ref.name` should only be set if component was loaded by name.
2019-09-30 15:37:32 -07:00
Alexey Volkov c7b95dd711 SDK - Notebooks - Deprecated the docker magic (#2266) 2019-09-30 13:55:31 -07:00
Ajay Gopinathan a882999c42 Use Remote Build Execution for Bazel builds. (#1031)
* [WIP] Use Remote Build Execution for Bazel builds.

* Add build_api_server.sh build script for API server.

* update build_image.yaml

* update build_image.yaml

* update build_image.yaml

* update build_image.yaml

* update build_image.yaml

* update build_image.yaml

* escape newlines

* Try using bazelbuilder's service account credentials.

* Clean up

* Add README

* Update backend README

* Update OWNERS
2019-09-30 10:41:38 -07:00
sina chavoshi 02f5bc08ff remove default namespace (#2250)
* remove default namespace

* updated args description

* updated comment per feedback.
2019-09-27 16:23:40 -07:00
dushyanthsc fbb008f593 third_party/metadata_envoy: Modify license file (#2224)
Change to update the approach to add license files to the
third_party/metadata_envoy docker image. This update moves from the
model of downloading the license files in each build to downloading it
locally to a license.txt file, checking the file in and using it to
store in the docker image.
2019-09-26 17:21:36 -07:00
Timur Solovev 389b585de1 SDK: fix label check for ContainerOP entities (#2243) 2019-09-26 13:13:35 -07:00
jingzhang36 7aaecb1501 Add necessary data types to api and database to support pipeline version. (#1873)
* Add necessary data types/tables for pipeline version. Mostly based
on Yang's branch at https://github.com/IronPan/pipelines/tree/kfpci/.
Backward compatible.

* Modified comment

* Modify api converter according with new pipeline (version) definition

* Change pipeline_store for DefaultVersionId field

* Add pipeline spec to pipeline version

* fix model converter

* fix a comment

* Add foreign key, pagination of list request, refactor code source

* Refactor code source

* Foreign key

* Change code source and package source type

* Fix ; separator

* Add versions table and modify existing pipeline apis

* Remove api pipeline defintiion change and leave it for later PR

* Add comment

* Make schema changing and data backfilling a single transaction

* Tolerate null default version id in code

* fix status

* Revise delete pipeline func

* Use raw query to migrate data

* No need to update versions status

* rename and minor changes

* accidentally removed a where clause

* Fix a model name prefix

* Refine comments

* Revise if condition

* Address comments

* address more comments

* Rearrange pipeline and version related parts inside CreatePipeline, to make them more separate.

* Add package url to pipeline version. Required when calling CreatePipelineVersionRequest

* Single code source url; remove pipeline id as sorting field; reformat

* resolve remote branch and local branch diff

* remove unused func

* Remove an empty line
2019-09-25 23:59:07 -07:00
Alexey Volkov 7735a14694 SDK - Components - Stop serializing string values (#2227)
This can happen with Lightweight component outputs if they've already been serialized manually.
2019-09-25 20:29:06 -07:00
Alexey Volkov 342abae27a SDK - Moved the _container_builder from kfp.compiler to kfp.containers (#2192)
* SDK - Moved the _container_builder from kfp.compiler to kfp.containers
This only moves the files. The imports remain the same for now.

* Simplified the imports.
2019-09-25 18:27:06 -07:00
Alexey Volkov 4339e70962 Components - Added AutoML Tables components and tests (#2174)
* Components - Added AutoML Tables components

* Added the sample - AutoML Tables - Retail product stockout prediction

* Replaced the project ID with dummy placeholder

* Fixed the description parameter passing

* Replaced pip with pip3 and changed quotes

* Added licenses

* Updated the component links

* Revert "Replaced pip with pip3"

This reverts commit 65ed0a7fc6. (part of it)

Here, `pip` is not the name of executable. It's the module name which is
just `pip`, not `pip3`.

* Changed quotes to single quotes

* Moved the components to the gcp folder

* Switched container images to python:3.7

* Updated component versions in sample
2019-09-25 13:42:06 -07:00
jingzhang36 33bbe549c3 Update changelog for release 0.1.31. (And also for 0.1.30 and 0.1.29, whose are not added before) (#2232) 2019-09-25 07:24:00 -07:00
Redback 9281ea1341 Updated README Swagger CodeGen version (#2228) 2019-09-24 22:49:59 -07:00
IronPan ee207f2b05
fix (#2231) 2019-09-25 12:44:12 +08:00
IronPan 99ce748630
update 2019-09-25 11:38:54 +08:00
Alexey Volkov 51585a7023 SDK - Containers - Do not create GCS bucket unless building the image (#1938)
Also missing default image name is no longer an error as long as the image name is provided to ContainerBuilder.build.
2019-09-24 20:21:58 -07:00
Alexey Volkov 98fd6c8c32 SDK - Components - Fixed serialization of lists and dicts containing `PipelineParam` items (#2212)
Fixes https://github.com/kubeflow/pipelines/issues/2206
The issue is fixed for both `JSON`-based and `str()`-based serialization.
2019-09-24 19:43:59 -07:00
IronPan 62a4f6da22
fix (#2214) 2019-09-25 10:01:45 +08:00
Alexey Volkov 3caba4e06f SDK - Lightweight - Added support for file outputs (#2221)
Lightweight components now allow function to mark some outputs that it wants to produce by writing data to files, not returning it as in-memory data objects.
This is useful when the data is expected to be big.

Example 1 (writing big amount of data to output file with provided path):
```python
@func_to_container_op
def write_big_data(big_file_path: OutputPath(str)):
    with open(big_file_path) as big_file:
        for i in range(1000000):
            big_file.write('Hello world\n')

```
Example 2 (writing big amount of data to provided output file stream):
```python
@func_to_container_op
def write_big_data(big_file: OutputTextFile(str)):
    for i in range(1000000):
        big_file.write('Hello world\n')
```
2019-09-24 18:11:58 -07:00
Jiaxiao Zheng 1914fa2f34 [Component] Fix the image version specification in create cluster component. (#2213)
* Fix

* Fix test
2019-09-24 17:11:59 -07:00
Kevin Bache b52e32b1a5 Add samples for loops (#2218)
* added loop samples

* moved samples; added samples to tests

* year
2019-09-24 14:59:58 -07:00
Alexey Volkov 9c9fb9d87e Docs - Added kfp.containers module (#2182)
And fixed the docstring
2019-09-24 13:43:59 -07:00
Yuan (Bob) Gong 3d7df0c522 Fix pipeline lite README (#2217)
/cc @jingzhang36
2019-09-24 10:27:29 -07:00
Alexey Volkov 2510a690f2 SDK - Lightweight - Added support for file inputs (#2207)
Lightweight components now allow function to mark some inputs that it wants to consume as files, not as in-memory data objects.
This is useful when the data is expected to be big.

Example 1:
```python
def consume_big_file_path(big_file_path: InputPath(str)) -> int:
    line_count = 0
    with open(big_file_path) as f:
        while f.readline():
            line_count = line_count + 1
    return line_count
```
Example 2:
```python
def consume_big_file(big_file: InputTextFile(str)) -> int:
    line_count = 0
    while big_file.readline():
        line_count = line_count + 1
    return line_count
```
2019-09-23 17:59:25 -07:00
Alexey Volkov 7dab30085e Testing - Output Argo workflow information when the workflow times out (#2176)
* Testing - Output Argo workflow information when the workflow times out

* Further improved argo logging in case of failure or timeout

* Fixed bug and addressed the feedback

* Fixed failure and timeout detection

* Making the script quieter

* check-argo-status no longer exits the main script on success
2019-09-23 16:07:24 -07:00
Ning 46026e56ae add support for hard and soft constraint in the preemptible nodepools (#2205)
* add support for hard and soft constraint in the preemptible nodepools

* fix unit tests
2019-09-23 15:19:26 -07:00
Alexey Volkov 1c287f2f89 SDK - Components - Simplified arg-parsing code using argparse.SUPPRESS (#2193) 2019-09-23 13:45:24 -07:00
IronPan 9b40564dc8 fix release CB and update readme (#2204) 2019-09-23 13:05:25 -07:00
Alexey Volkov c914df542c SDK - Python components - Properly serializing outputs (#2198)
* SDK - Tests - Added better helper functions for testing python components

* SDK - Python components - Properly serializing outputs
Background:
Component arguments are already properly serialized when calling the component program and then deserialized before the execution of the component function.
But the component outputs were only serialized using `str()` which is inadequate for data types like lists or dictionaries.

This commit fixes the mismatch - theoutputs are now serialized the same ways as arguments and default values.
2019-09-23 12:29:33 -07:00
Alexey Volkov db6625ff96 SDK - Removed some dead code (#2194) 2019-09-23 12:29:25 -07:00
Ning 86163ecd38
Remove dataflow components (#2161)
* remove dataflow components
2019-09-23 11:12:27 -07:00
IronPan 005a2e54d1 fix envoy dockerfile (#2200) 2019-09-23 09:03:24 -07:00
IronPan ad0ef00db4 update dockerfile for envoy (#2197) 2019-09-23 06:39:22 -07:00
Alexey Volkov 00db6ec874 Added generated Python SDK documentation to .gitignore (#2181) 2019-09-22 20:37:22 -07:00
IronPan 81bfca8130 push pipeline-lite YAML as part of release CB (#2186)
* small fixes

* push pipeline-lite YAML as part of release

* Delete Makefile

* push pipeline-lite YAML as part of release
2019-09-22 19:59:23 -07:00
IronPan 44a08a5275 Update pipeline-lite to v0.1.31 (#2189)
* small fixes

* update version to 0.1.31

* update version to 0.1.31
2019-09-22 09:57:23 -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
IronPan 0711566754 Build inverse proxy image as part of the presubmit test (#2187)
* small fixes

* add

* Delete Makefile
2019-09-21 16:53:23 -07:00
dushyanthsc 0459ff9b32 metadata-envoy: Build script for metadata-envoy docker image (#2178)
Change to introduce building metadata-envoy docker image.
2019-09-20 21:43:39 -07:00
Ajay Gopinathan d5316f0754 Use latest Tensorflow image for Tensorboard. (#2140)
* Use latest Tensorflow image for Tensorboard.

* Fix tests
2019-09-20 21:43:32 -07:00
dushyanthsc ab8f5ed043 metadata: deployment update (#2093)
Change to create mysql credential K8 object as part of deployment
2019-09-20 21:43:24 -07:00
IronPan 5561bfdb9c
Update owner for thirdparty (#2168)
/assign @dushyanthsc @Bobgy
2019-09-21 10:14:19 +08:00
dushyanthsc 57d9f7f1cf metadata: Deployment scripts update (#2180)
Change to parameterize database_name, host and port for metadata
deployment using config maps
2019-09-20 16:45:25 -07:00
Jiaxiao Zheng ec1ae92210 Update help info for SA. (#2179) 2019-09-20 15:49:23 -07:00
Alexey Volkov ef63c653af SDK - Compiler - Fix large data passing (#2173)
* SDK - Compiler - Fix large data passing

Stop outputting parameters unless they're consumed as parameters downstream.
This prevents the situaltion when component outputs a big file, but DSL compiler instructs Argo to pick it up as parameter (parameters only hold few kilobytes of data).

As byproduct, this change fixes some minor compiler data passing bugs where some parameters were being passed around, but never consumed (happened with `ResourceOp`, `dsl.Condition` and recursion).

* Replaced ... with `raise AssertionError`

* Fixed small bug

* Removed unused variables

* Fixed names of the mark_upstream_ios_of_* functions

* Fixed detection of parameter output references

* Fixed handling of volumes
2019-09-20 15:05:27 -07:00
Alexey Volkov 372efe56c5 Tests - Samples - Added the component_build sample test (#2147)
* Tests - Samples - Added the component_build sample test

* Fixed the papermill issue

* Renamed EXPERIMENT_NAME to experiment_name
2019-09-20 14:31:27 -07:00
Yuan (Bob) Gong 7659e238bf Execution detail page shows inputs and outputs (#2155)
* Utils to convert metadata api from callback paradigm to promise paradigm

* Show input and output in execution details page

* Change execution detail page input/output table styling

* Make artifact names in execution detail page a deep link

* Change deep link to artifact ID instead

* Fix absolute import

* Fix lint errors
2019-09-20 07:57:00 -07:00
Yuan (Bob) Gong 0a38ced70a Make gs:// links in metadata UI point to GCS console page (#2167)
* Add gcloud console link for gs:// uris on artifact list page

* Make every gs:// link clickable

* Fix compile error
2019-09-20 07:25:00 -07:00