The model versioning registry does not use the location from fully-qualified model name. It should be using the same location as the model when it gets the fully qualified resource name.
Environment details
- OS type and version: windows 10
- Python version:
Python 3.11.5
- pip version:
pip 23.2.1 from C:\Users\E10270\.conda\envs\py311test\Lib\site-packages\pip (python 3.11)
google-cloud-aiplatform version:
Name: google-cloud-aiplatform
Version: 1.33.1
Summary: Vertex AI API client library
Home-page: https://github.com/googleapis/python-aiplatform
Author: Google LLC
Author-email: googleapis-packages@google.com
License: Apache 2.0
Location: C:\Users\E10270\.conda\envs\py311test\Lib\site-packages
Requires: google-api-core, google-cloud-bigquery, google-cloud-resource-manager, google-cloud-storage, packaging, proto-plus, protobuf, shapely
Required-by:
Steps to reproduce
- Install the package
- Run the code
- see that the client url for versioning registry
Code example
>>> from google.cloud.aiplatform import Model
>>> versioned_resource_name = 'projects/899305778619/locations/us-east1/models/scam-nlp-genie-scam-detector-type-gpu-2-new-async-model@3'
>>> model = Model(versioned_resource_name)
>>> model.versioning_registry.client.api_endpoint
'us-central1-aiplatform.googleapis.com'
>>> model2 = Model(versioned_resource_name, location='us-east1')
>>> model2.versioning_registry.client.api_endpoint
'us-east1-aiplatform.googleapis.com'
Stack trace
There is none, but it crashes when I try to update the labels using the versioning registry, because it queries incorrect region.
The model versioning registry does not use the location from fully-qualified model name. It should be using the same location as the model when it gets the fully qualified resource name.
Environment details
Python 3.11.5pip 23.2.1 from C:\Users\E10270\.conda\envs\py311test\Lib\site-packages\pip (python 3.11)google-cloud-aiplatformversion:Steps to reproduce
Code example
Stack trace
There is none, but it crashes when I try to update the labels using the versioning registry, because it queries incorrect region.