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: updating Tensorboard related code to use v1 #851

Merged
merged 1 commit into from Nov 19, 2021
Merged

feat: updating Tensorboard related code to use v1 #851

merged 1 commit into from Nov 19, 2021

Conversation

yfang1
Copy link
Contributor

@yfang1 yfang1 commented Nov 18, 2021

Fallout of #849

@product-auto-label product-auto-label bot added the api: aiplatform Issues related to the AI Platform API. label Nov 18, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Nov 18, 2021
@morgandu
Copy link
Contributor

Left a comment which applies to all the changes. So the rule of thumb is:

if your expected version aligns with the DEFAULT_VERSION in the compact module, no need to specify version i.e. from google.cloud.aiplatform.compat.types import tensorboard_data; but if your expected version is different than the DEFAULT_VERSION, import the particular version. i.e. from google.cloud.aiplatform.compat.types import tensorboard_data_v1beta1.

@yfang1 yfang1 requested a review from morgandu November 19, 2021 05:58
Copy link
Contributor

@morgandu morgandu left a comment

Choose a reason for hiding this comment

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

Sorry I probably missed the test_uploader.py in the previous review. For unit tests, we don't rely on the compat module, instead we specify the expected version. Because we don't have tests when compat may or may not select different version within different resource class methods, this way we can ensure class methods calling compat returning the right version we expect.

We only discussed this when compat was introduced, but did not enforce the implementation across all other module, so there is some inconsistency in the code base. But prefer start to enforce it for the reason mentioned above.

google/cloud/aiplatform/tensorboard/uploader_utils.py Outdated Show resolved Hide resolved
tests/unit/aiplatform/test_uploader.py Outdated Show resolved Hide resolved
tests/unit/aiplatform/test_uploader.py Outdated Show resolved Hide resolved
tests/unit/aiplatform/test_uploader.py Show resolved Hide resolved
tests/unit/aiplatform/test_uploader.py Outdated Show resolved Hide resolved
tests/unit/aiplatform/test_uploader.py Show resolved Hide resolved
@yfang1 yfang1 merged commit b613b26 into googleapis:main Nov 19, 2021
@yfang1 yfang1 deleted the v1 branch November 19, 2021 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: aiplatform Issues related to the AI Platform API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants