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

Improve get_experiment and list_runs in the python sdk #508

Merged
merged 7 commits into from
Dec 12, 2018
Merged

Improve get_experiment and list_runs in the python sdk #508

merged 7 commits into from
Dec 12, 2018

Conversation

gaoning777
Copy link
Contributor

@gaoning777 gaoning777 commented Dec 10, 2018

resolving #506
/cc qimingj Ark-kun


This change is Reviewable

@gaoning777 gaoning777 changed the title Add python sdk Improve get_experiment and list_runs in the python sdk Dec 10, 2018
sdk/python/kfp/_client.py Outdated Show resolved Hide resolved
@qimingj
Copy link
Contributor

qimingj commented Dec 11, 2018

/lgtm

@gaoning777
Copy link
Contributor Author

/test kubeflow-pipeline-sample-test

raise ValueError('Either experiment_id or experiment_name is required')
if experiment_id is not None:
return self._experiment_api.get_experiment(id=experiment_id)
next_page_token = ''
Copy link
Contributor

@Ark-kun Ark-kun Dec 11, 2018

Choose a reason for hiding this comment

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

What do you think about having a separate get_experiment_by_name function? Calling it would be a bit shorter and the function code will be simpler?

get_experiment_by_name('foo')

vs

get_experiment(experiment_name='foo')

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bradley and I discussed this yesterday. It seems more natural and simple to have get_experiment that takes either name or id. Or else, it would rather be two functions named get_experiment_by_id and get_experiment_by_name, which would break the backward compatibility because we still want to support the get_experiment function.

@k8s-ci-robot k8s-ci-robot removed the lgtm label Dec 11, 2018
@qimingj
Copy link
Contributor

qimingj commented Dec 12, 2018

/lgtm

@gaoning777
Copy link
Contributor Author

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gaoning777

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

1 similar comment
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gaoning777

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

@k8s-ci-robot k8s-ci-robot merged commit 886e113 into kubeflow:master Dec 12, 2018
@gaoning777 gaoning777 deleted the add-python-sdk branch December 19, 2018 17:21
neuromage pushed a commit to neuromage/pipelines that referenced this pull request Dec 22, 2018
* add get_experiment_id and list_runs_by_experiment

* offer only one get_experiment function

* return experiment body instead of id

* simply codes

* simply code 2

* remove experiment_id check in the while loop

* minor bug
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.

4 participants