GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: Expose additional attributes into Vertex SDK to close gap with GAPIC by vinnysenthil · Pull Request #477 · googleapis/python-aiplatform

Conversation

@vinnysenthil

@vinnysenthil vinnysenthil commented Jun 14, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Exposes the following attributes:

Base Resource Noun

  • VertexAiResourceNoun.encryption_spec
  • VertexAiResourceNoun.labels

TrainingJob

  • _TrainingJob.start_time
  • _TrainingJob.end_time
  • _TrainingJob.error
  • _CustomTrainingJob.network

Job

  • _Job.start_time
  • _Job.end_time
  • _Job.error
  • HyperparameterTuningJob.network
  • CustomJob.network

Model

  • Model.predict_schemata
  • Model.supported_deployment_resources_types
  • Model.supported_input_storage_formats
  • Model.supported_output_storage_formats
  • Model.training_pipeline
  • Model.container_spec

Endpoint

  • Endpoint.traffic_split
  • Endpoint.network

BatchPredictionJob

  • BatchPredictionJob.output_info
  • BatchPredictionJob.partial_failures
  • BatchPredictionJob.completion_stats

Other changes

  • Dataset.__len__()
    • Removed due to error with unit tests, will add later once b/190008971 is addressed
  • _Training_Job._get_and_return_subclass()
  • Fixed CustomJob._list_method
  • Unit tests for new methods

Fixes b/185913907 🦕

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
vinnysenthil added 3 commits June 12, 2021 16:57
@vinnysenthil
Add most missing fields
57fe05d
@vinnysenthil
Add tests for get trainingjob subclass
fadd848
@vinnysenthil
Merge branch 'master' into add-missing-fields
f02a067
@product-auto-label product-auto-label Bot added the api: aiplatform Issues related to the AI Platform API. label Jun 14, 2021
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Jun 14, 2021
@vinnysenthil
Drop Dataset len, add more attrs, update docstrings
8ace6c1
@vinnysenthil
vinnysenthil marked this pull request as ready for review June 15, 2021 00:02
@vinnysenthil
vinnysenthil requested a review from sasha-gitg June 15, 2021 00:02
@vinnysenthil
flake8 lint
e63778d
@vinnysenthil vinnysenthil changed the title feat: [Work in Progress] Expose additional attributes into Vertex SDK to close gap with GAPIC feat: Expose additional attributes into Vertex SDK to close gap with GAPIC Jun 15, 2021
@vinnysenthil
vinnysenthil requested review from ivanmkc and morgandu June 15, 2021 17:25
sasha-gitg
sasha-gitg requested changes Jun 15, 2021
View reviewed changes
Comment thread google/cloud/aiplatform/base.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google/cloud/aiplatform/jobs.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google/cloud/aiplatform/models.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google/cloud/aiplatform/base.py Outdated
"""Time when the Pipline or Job entered the `JOB_STATE_RUNNING` or
`PIPELINE_STATE_RUNNING` for the first time. Only for Job or Pipeline resources."""
self._sync_gca_resource()
return getattr(self._gca_resource, "start_time")

@sasha-gitg sasha-gitg Jun 15, 2021

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Is the getattr access pattern necessary? It seems like if the field doesn't exist in the proto, it will default to return None.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vinnysenthil vinnysenthil Jun 15, 2021

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I thought about this, if we are certain the field will always be present then we should return it directly. But I went with getattr for fields that are Optional and we know won't be populated sometimes. However they do appear to default to None, any preference on your end?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google/cloud/aiplatform/models.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google/cloud/aiplatform/training_jobs.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google/cloud/aiplatform/training_jobs.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

vinnysenthil added 3 commits June 15, 2021 14:31
@vinnysenthil
Address reviewer comments
fb798e5
@vinnysenthil
Switch 'an' to 'a' when referencing Vertex AI
08bea1a
@vinnysenthil
Address comments, move base attrs to subclasses
1653b9d
@vinnysenthil
vinnysenthil requested a review from sasha-gitg June 16, 2021 07:19
@vinnysenthil vinnysenthil added kokoro:force-run Add this label to force Kokoro to re-run the tests. and removed kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jun 16, 2021
@vinnysenthil
Drop unused import
88c076a
ivanmkc
ivanmkc reviewed Jun 16, 2021
View reviewed changes
Comment thread google/cloud/aiplatform/training_jobs.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

ivanmkc
ivanmkc suggested changes Jun 16, 2021
View reviewed changes

@ivanmkc ivanmkc left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Let's figure out the discussion on _get_and_return_subclass

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ivanmkc
ivanmkc approved these changes Jun 16, 2021
View reviewed changes
sasha-gitg
sasha-gitg approved these changes Jun 16, 2021
View reviewed changes
Comment thread google/cloud/aiplatform/models.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google/cloud/aiplatform/jobs.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google/cloud/aiplatform/jobs.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

vinnysenthil added 2 commits June 16, 2021 18:08
@vinnysenthil
Add test to ensure supported training schemas are always unique
c46c68b
@vinnysenthil
Address reviewer comments
0ed7704
@vinnysenthil
vinnysenthil merged commit 572a27c into master Jun 17, 2021
@vinnysenthil
vinnysenthil deleted the add-missing-fields branch June 17, 2021 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@sasha-gitg sasha-gitg sasha-gitg approved these changes
@morgandu morgandu Awaiting requested review from morgandu
+1 more reviewer
@ivanmkc ivanmkc ivanmkc approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: aiplatform Issues related to the AI Platform API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@vinnysenthil @ivanmkc @sasha-gitg
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.