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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Expose additional attributes into Vertex SDK to close gap with GAPIC #477
Conversation
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") |
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
.
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?
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
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__()
_Training_Job._get_and_return_subclass()
CustomJob._list_method
Fixes b/185913907 馃