Skip to content

01-dataset-management.ipynb fails at "Create Vertex Dataset resource" with "no attribute 'SUPPORTED_REGIONS'" #32

@destijl

Description

@destijl

In 01-dataset-management.ipynb at "Create Vertex Dataset resource" I get the following error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/var/tmp/ipykernel_23085/3064911949.py in <module>
      1 vertex_ai.init(
      2     project=PROJECT,
----> 3     location=REGION
      4 )

/opt/conda/lib/python3.7/site-packages/google/cloud/aiplatform/initializer.py in init(self, project, location, experiment, experiment_description, staging_bucket, credentials, encryption_spec_key_name)
     97             self._project = project
     98         if location:
---> 99             utils.validate_region(location)
    100             self._location = location
    101         if staging_bucket:

/opt/conda/lib/python3.7/site-packages/google/cloud/aiplatform/utils/__init__.py in validate_region(region)
    272 
    273     region = region.lower()
--> 274     if region not in constants.SUPPORTED_REGIONS:
    275         raise ValueError(
    276             f"Unsupported region for Vertex AI, select from {constants.SUPPORTED_REGIONS}"

AttributeError: module 'google.cloud.aiplatform.constants' has no attribute 'SUPPORTED_REGIONS'

It's mentioned here: googleapis/python-aiplatform#1106

Sounds like it used to be in constants.SUPPORTED_REGIONS and now it's in constants.base.SUPPORTED_REGION.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions