Skip to content

Commit

Permalink
add client methods
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-mccarthy committed Apr 14, 2022
1 parent d46fafe commit 55cf4cd
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions sdk/python/kfp/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,16 +585,21 @@ def get_experiment(self,
experiment_name))
return result.experiments[0]

def archive_experiment(self, experiment_id: str):
def archive_experiment(self, experiment_id: str) -> None:
"""Archives an experiment.
Args:
experiment_id: id of the experiment.
"""
self._experiment_api.archive_experiment(id=experiment_id)

Raises:
kfp_server_api.ApiException: If experiment is not found.
def unarchive_experiment(self, experiment_id: str) -> None:
"""Unarchives an experiment.
Args:
experiment_id: id of the experiment.
"""
self._experiment_api.archive_experiment(experiment_id)
self._experiment_api.unarchive_experiment(id=experiment_id)

def delete_experiment(self, experiment_id):
"""Delete experiment.
Expand Down Expand Up @@ -1486,6 +1491,23 @@ def list_pipeline_versions(
resource_key_id=pipeline_id,
filter=filter)

def get_pipeline_version(
self, version_id: str
) -> kfp_server_api.models.api_pipeline_version.ApiPipelineVersion:
"""Gets a pipeline version.
Args:
version_id: id of the pipeline version.
Returns:
Object. If the method is called asynchronously, returns the request
thread.
Raises:
kfp_server_api.ApiException: If pipeline version is not found.
"""
return self._pipelines_api.get_pipeline_version(version_id=version_id)

def delete_pipeline_version(self, version_id: str):
"""Deletes a pipeline version.
Expand Down

0 comments on commit 55cf4cd

Please sign in to comment.