Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting AttributeError when importing cloud_profiler from google cloud aiplatform #4079

Closed
Abe410 opened this issue Jul 10, 2024 · 2 comments · Fixed by #4428 or #4496
Closed

Getting AttributeError when importing cloud_profiler from google cloud aiplatform #4079

Abe410 opened this issue Jul 10, 2024 · 2 comments · Fixed by #4428 or #4496
Assignees
Labels
api: vertex-ai Issues related to the googleapis/python-aiplatform API.

Comments

@Abe410
Copy link

Abe410 commented Jul 10, 2024

When running the following:

from google.cloud.aiplatform.training_utils import cloud_profiler

I get:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[2], line 1
----> 1 from google.cloud.aiplatform.training_utils import cloud_profiler

File /opt/micromamba/lib/python3.10/site-packages/google/cloud/aiplatform/__init__.py:26
     21 __version__ = aiplatform_version.__version__
     24 from google.cloud.aiplatform import initializer
---> 26 from google.cloud.aiplatform.datasets import (
     27     ImageDataset,
     28     TabularDataset,
     29     TextDataset,
     30     TimeSeriesDataset,
     31     VideoDataset,
     32 )
     33 from google.cloud.aiplatform import explain
     34 from google.cloud.aiplatform import gapic

File /opt/micromamba/lib/python3.10/site-packages/google/cloud/aiplatform/datasets/__init__.py:19
      1 # -*- coding: utf-8 -*-
      2 
      3 # Copyright 2020 Google LLC
   (...)
     15 # limitations under the License.
     16 #
     18 from google.cloud.aiplatform.datasets.dataset import _Dataset
---> 19 from google.cloud.aiplatform.datasets.column_names_dataset import _ColumnNamesDataset
     20 from google.cloud.aiplatform.datasets.tabular_dataset import TabularDataset
     21 from google.cloud.aiplatform.datasets.time_series_dataset import TimeSeriesDataset

File /opt/micromamba/lib/python3.10/site-packages/google/cloud/aiplatform/datasets/column_names_dataset.py:24
     21 from typing import List, Optional, Set
     22 from google.auth import credentials as auth_credentials
---> 24 from google.cloud import bigquery
     25 from google.cloud import storage
     27 from google.cloud.aiplatform import utils

File /opt/micromamba/lib/python3.10/site-packages/google/cloud/bigquery/__init__.py:35
     31 from google.cloud.bigquery import version as bigquery_version
     33 __version__ = bigquery_version.__version__
---> 35 from google.cloud.bigquery.client import Client
     36 from google.cloud.bigquery.dataset import AccessEntry
     37 from google.cloud.bigquery.dataset import Dataset

File /opt/micromamba/lib/python3.10/site-packages/google/cloud/bigquery/client.py:69
     65     DEFAULT_BQSTORAGE_CLIENT_INFO = None  # type: ignore
     68 from google.cloud.bigquery._http import Connection
---> 69 from google.cloud.bigquery import _job_helpers
     70 from google.cloud.bigquery import _pandas_helpers
     71 from google.cloud.bigquery import _versions_helpers

File /opt/micromamba/lib/python3.10/site-packages/google/cloud/bigquery/_job_helpers.py:47
     44 import google.api_core.exceptions as core_exceptions
     45 from google.api_core import retry as retries
---> 47 from google.cloud.bigquery import job
     48 import google.cloud.bigquery.query
     49 from google.cloud.bigquery import table

File /opt/micromamba/lib/python3.10/site-packages/google/cloud/bigquery/job/__init__.py:17
      1 # Copyright 2015 Google LLC
      2 #
      3 # Licensed under the Apache License, Version 2.0 (the "License");
   (...)
     12 # See the License for the specific language governing permissions and
     13 # limitations under the License.
     15 """Define API Jobs."""
---> 17 from google.cloud.bigquery.job.base import _AsyncJob
     18 from google.cloud.bigquery.job.base import _error_result_to_exception
     19 from google.cloud.bigquery.job.base import _DONE_STATE

File /opt/micromamba/lib/python3.10/site-packages/google/cloud/bigquery/job/base.py:30
     28 from google.cloud.bigquery import _helpers
     29 from google.cloud.bigquery._helpers import _int_or_none
---> 30 from google.cloud.bigquery.retry import (
     31     DEFAULT_GET_JOB_TIMEOUT,
     32     DEFAULT_RETRY,
     33 )
     36 _DONE_STATE = "DONE"
     37 _STOPPED_REASON = "stopped"

File /opt/micromamba/lib/python3.10/site-packages/google/cloud/bigquery/retry.py:150
    145 DEFAULT_GET_JOB_TIMEOUT = 128
    146 """
    147 Default timeout for Client.get_job().
    148 """
--> 150 POLLING_DEFAULT_VALUE = google.api_core.future.polling.PollingFuture._DEFAULT_VALUE
    151 """
    152 Default value defined in google.api_core.future.polling.PollingFuture.
    153 """

AttributeError: type object 'PollingFuture' has no attribute '_DEFAULT_VALUE'

Running google-cloud-aiplatform==1.57.0

@product-auto-label product-auto-label bot added the api: vertex-ai Issues related to the googleapis/python-aiplatform API. label Jul 10, 2024
sasha-gitg referenced this issue in googleapis/python-bigquery Jul 10, 2024
* feat: add default timeout for Client.get_job()

* change timeout type detection

* lint

* fix unit test and coverage

* add type hint

* fix type hint

* change import style and add comments

* remove sentinel value in client

* type hint

* typo

* add sentinel for query_and_wait()

* add unit tests

* fix unit test

* Update google/cloud/bigquery/job/query.py

Co-authored-by: Tim Sweña (Swast) <swast@google.com>

* Update google/cloud/bigquery/job/query.py

Co-authored-by: Tim Sweña (Swast) <swast@google.com>

* address comments

* typo

* type hint

* typos

---------

Co-authored-by: Tim Sweña (Swast) <swast@google.com>
@sasha-gitg
Copy link
Member

@Abe410 What version of google-api-core do you have installed?

@Abe410
Copy link
Author

Abe410 commented Jul 10, 2024

@Abe410 What version of google-api-core do you have installed?

google-api-core==2.8.1

copybara-service bot pushed a commit that referenced this issue Sep 19, 2024
copybara-service bot pushed a commit that referenced this issue Sep 19, 2024
copybara-service bot pushed a commit that referenced this issue Oct 1, 2024
copybara-service bot pushed a commit that referenced this issue Oct 1, 2024
copybara-service bot pushed a commit that referenced this issue Oct 1, 2024
* Added `generative_models.FunctionCall` class (returned by `Part.FunctionCall`).

Fixes #4079

PiperOrigin-RevId: 680897095
copybara-service bot pushed a commit that referenced this issue Oct 1, 2024
* Added `generative_models.FunctionCall` class (returned by `Part.FunctionCall`).

Fixes #4079

PiperOrigin-RevId: 680897095
copybara-service bot pushed a commit that referenced this issue Oct 2, 2024
* Added `generative_models.FunctionCall` class (returned by `Part.FunctionCall`).

Fixes #4079

PiperOrigin-RevId: 680897095
copybara-service bot pushed a commit that referenced this issue Oct 7, 2024
* Added `generative_models.FunctionCall` class (returned by `Part.FunctionCall`).

Fixes #4079

PiperOrigin-RevId: 680897095
copybara-service bot pushed a commit that referenced this issue Oct 8, 2024
* Added `generative_models.FunctionCall` class (returned by `Part.FunctionCall`).

Fixes #4079

PiperOrigin-RevId: 680897095
copybara-service bot pushed a commit that referenced this issue Oct 8, 2024
* Added `generative_models.FunctionCall` class (returned by `Part.FunctionCall`).

Fixes #4079

PiperOrigin-RevId: 680897095
copybara-service bot pushed a commit that referenced this issue Oct 8, 2024
* Added `generative_models.FunctionCall` class (returned by `Part.FunctionCall`).

Fixes #4079

PiperOrigin-RevId: 680897095
copybara-service bot pushed a commit that referenced this issue Oct 8, 2024
* Added `generative_models.FunctionCall` class (returned by `Part.FunctionCall`).

Fixes #4079

PiperOrigin-RevId: 683761041
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: vertex-ai Issues related to the googleapis/python-aiplatform API.
Projects
None yet
2 participants