feat: Expose additional attributes into Vertex SDK to close gap with GAPIC#477
Merged
vinnysenthil merged 11 commits intomasterfrom Jun 17, 2021
Merged
feat: Expose additional attributes into Vertex SDK to close gap with GAPIC#477vinnysenthil merged 11 commits intomasterfrom
vinnysenthil merged 11 commits intomasterfrom
Conversation
sasha-gitg
requested changes
Jun 15, 2021
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") |
Member
There was a problem hiding this comment.
Is the getattr access pattern necessary? It seems like if the field doesn't exist in the proto, it will default to return None.
Contributor
Author
There was a problem hiding this comment.
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?
ivanmkc
reviewed
Jun 16, 2021
ivanmkc
suggested changes
Jun 16, 2021
Contributor
ivanmkc
left a comment
There was a problem hiding this comment.
Let's figure out the discussion on _get_and_return_subclass
ivanmkc
approved these changes
Jun 16, 2021
sasha-gitg
approved these changes
Jun 16, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Exposes the following attributes:
Base Resource Noun
VertexAiResourceNoun.encryption_specVertexAiResourceNoun.labelsTrainingJob
_TrainingJob.start_time_TrainingJob.end_time_TrainingJob.error_CustomTrainingJob.networkJob
_Job.start_time_Job.end_time_Job.errorHyperparameterTuningJob.networkCustomJob.networkModel
Model.predict_schemataModel.supported_deployment_resources_typesModel.supported_input_storage_formatsModel.supported_output_storage_formatsModel.training_pipelineModel.container_specEndpoint
Endpoint.traffic_splitEndpoint.networkBatchPredictionJob
BatchPredictionJob.output_infoBatchPredictionJob.partial_failuresBatchPredictionJob.completion_statsOther changes
Dataset.__len__()_Training_Job._get_and_return_subclass()CustomJob._list_methodFixes b/185913907 🦕