Skip to content

Commit

Permalink
Add filter docstrings.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarp committed Oct 26, 2021
1 parent 29e8ed9 commit 8830060
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions sdk/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

* Fix placeholder mapping error in v2. [\#6794](https://github.com/kubeflow/pipelines/pull/6794)
* Depends on `kfp-pipeline-spec>=0.1.13,<0.2.0` [\#6803](https://github.com/kubeflow/pipelines/pull/6803)
* Add optional `filter` argument to list methods of KFP client.

## Documentation Updates

Expand Down
10 changes: 9 additions & 1 deletion sdk/python/kfp/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,8 @@ def list_experiments(self,
namespace: Kubernetes namespace where the experiment was created.
For single user deployment, leave it as None;
For multi user, input a namespace where the user is authorized.
filter: A url-encoded, JSON-serialized Filter protocol buffer
(see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
Returns:
A response object including a list of experiments and next page token.
Expand Down Expand Up @@ -646,13 +648,15 @@ def _override_caching_options(self, workflow: dict, enable_caching: bool):
'pipelines.kubeflow.org/enable_caching'] = str(
enable_caching).lower()

def list_pipelines(self, page_token='', page_size=10, sort_by=''):
def list_pipelines(self, page_token='', page_size=10, sort_by='', filter=None):
"""List pipelines.
Args:
page_token: Token for starting of the page.
page_size: Size of the page.
sort_by: one of 'field_name', 'field_name desc'. For example, 'name desc'.
filter: A url-encoded, JSON-serialized Filter protocol buffer
(see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
Returns:
A response object including a list of pipelines and next page token.
Expand Down Expand Up @@ -1106,6 +1110,8 @@ def list_runs(self,
namespace: Kubernetes namespace to filter upon.
For single user deployment, leave it as None;
For multi user, input a namespace where the user is authorized.
filter: A url-encoded, JSON-serialized Filter protocol buffer
(see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
Returns:
A response object including a list of experiments and next page token.
Expand Down Expand Up @@ -1150,6 +1156,8 @@ def list_recurring_runs(self,
page_size: Size of the page.
sort_by: One of 'field_name', 'field_name desc'. For example, 'name desc'.
experiment_id: Experiment id to filter upon.
filter: A url-encoded, JSON-serialized Filter protocol buffer
(see [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)).
Returns:
A response object including a list of recurring_runs and next page token.
Expand Down

0 comments on commit 8830060

Please sign in to comment.