Skip to content
This repository has been archived by the owner on Dec 2, 2021. It is now read-only.

Python SDK improvements #167

Merged
merged 6 commits into from
Nov 19, 2019
Merged

Conversation

zhenghuiwang
Copy link
Contributor

@zhenghuiwang zhenghuiwang commented Nov 14, 2019

This PR improves current Python SDK:

  • Adds retries to all outbound gRPC calls.
  • Handles the case of logging the same artifact multiple times:
    • Case 1: the artifact already has a ID assigned. It means this artifact was saved before, then no need to save the data again.
    • Case 2: new artifact doesn't have ID, but can be considered as duplication of some artifact in the DB. For example, a model with save name, version and uri. An artifact class is asked to have a optional is_duplicated method to determine the case.
  • Introduces python ABC for abstract Artifact, which formally states the protocol used before.
  • add __repr__ to better print out artifact objects.

Testing:

  • More tests are added.
  • Rewrite the test setup to start tests from a virtual env.

This change is Reviewable

@zhenghuiwang
Copy link
Contributor Author

/test kubeflow-metadata-presubmit

@zhenghuiwang zhenghuiwang changed the title [WIP] SDK improvements & update demo notebook [WIP] SDK improvements Nov 14, 2019
@zhenghuiwang zhenghuiwang changed the title [WIP] SDK improvements Python SDK improvements Nov 14, 2019
@zhenghuiwang
Copy link
Contributor Author

/assign @jinchihe @gaoning777

It is ready for your review. Thanks

@jinchihe
Copy link
Member

Would please update new version in setup.py file so that we can release new pkg in Pypi for the two new big enhancements? Others look good to me.

@zhenghuiwang
Copy link
Contributor Author

Would please update new version in setup.py file so that we can release new pkg in Pypi for the two new big enhancements? Others look good to me.

Thanks @jinchihe . setup.py is already 0.3.0. (PyPI has 0.2.0) So no need to change it.

I can publish 0.3.0 once this PR is landed.

@jinchihe
Copy link
Member

@zhenghuiwang Great.
/lgtm

@zhenghuiwang
Copy link
Contributor Author

/approve

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zhenghuiwang

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 4d74694 into kubeflow:master Nov 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants