Client - Allow specifying pipeline description when uploading (#3828)

* Client - Allow specifying pipeline description when uploading

Fixes https://github.com/kubeflow/pipelines/issues/3825

* Implemented review feedback
This commit is contained in:
Alexey Volkov 2020-05-23 18:13:11 -07:00 committed by GitHub
parent bbe598db26
commit e52481a164
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -672,16 +672,22 @@ class Client(object):
workflow_json = json.loads(workflow)
return workflow_json
def upload_pipeline(self, pipeline_package_path, pipeline_name=None):
def upload_pipeline(
self,
pipeline_package_path: str = None,
pipeline_name: str = None,
description: str = None,
):
"""Uploads the pipeline to the Kubeflow Pipelines cluster.
Args:
pipeline_package_path: Local path to the pipeline package.
pipeline_name: Optional. Name of the pipeline to be shown in the UI.
description: Optional. Description of the pipeline to be shown in the UI.
Returns:
Server response object containing pipleine id and other information.
"""
response = self._upload_api.upload_pipeline(pipeline_package_path, name=pipeline_name)
response = self._upload_api.upload_pipeline(pipeline_package_path, name=pipeline_name, description=description)
if self._is_ipython():
import IPython
html = 'Pipeline link <a href=%s/#/pipelines/details/%s>here</a>' % (self._get_url_prefix(), response.id)