Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sdk): add .list_pipeline_versions and .unarchive_experiment methods to Client #7563

Merged
merged 2 commits into from
Apr 14, 2022

Conversation

connor-mccarthy
Copy link
Member

Description of your changes:
Test code for reviewer, if desired:

from kfp.client import Client

c = Client()

es = c.list_experiments()
experiment_id = 
es.to_dict()['experiments'][0]['id']
print("ARCHIVE", 
c.archive_experiment(experiment_id=experiment_id))
print("GET", 
c.get_experiment(experiment_id=experiment_id))
print("UNARCHIVE", 
c.unarchive_experiment(experiment_id=experiment_id))
print("GET", 
c.get_experiment(experiment_id=experiment_id))

pipeline_id = 
c.list_pipelines().to_dict()['pipelines'][0]['id']
print(c.list_pipeline_versions(pipeline_id=pipeline_id))

Checklist:

@google-oss-prow
Copy link

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@connor-mccarthy
Copy link
Member Author

/test all

@connor-mccarthy
Copy link
Member Author

/test all

@connor-mccarthy connor-mccarthy marked this pull request as ready for review April 14, 2022 17:06

Raises:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still have raises part for those?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could not get this to raise an exception, so I removed from the docstring. Test case:

from kfp.client import Client

client = Client()
# does not raise an exception
assert client.archive_experiment(experiment_id="dummy_id") is None

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, thank you!!

@ji-yaqi
Copy link
Contributor

ji-yaqi commented Apr 14, 2022

/lgtm
/approve

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ji-yaqi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@connor-mccarthy
Copy link
Member Author

/retest

@google-oss-prow google-oss-prow bot merged commit 2494447 into kubeflow:master Apr 14, 2022
abaland pushed a commit to abaland/pipelines that referenced this pull request May 29, 2022
…ods to Client (kubeflow#7563)

* add client methods

* update release notes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants