Skip to content

Commit

Permalink
Client - Allow specifying pipeline description when uploading (#3828)
Browse files Browse the repository at this point in the history
* Client - Allow specifying pipeline description when uploading

Fixes #3825

* Implemented review feedback
  • Loading branch information
Ark-kun committed May 24, 2020
1 parent bbe598d commit e52481a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions sdk/python/kfp/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -672,16 +672,22 @@ def _get_workflow_json(self, run_id):
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)
Expand Down

0 comments on commit e52481a

Please sign in to comment.