googleapis / googleapis/python-aiplatform

Importing class `Model` from `google.cloud.aiplatform.models` is slow

オープン
#1,994 コメント 6 件 リアクション 1 件 担当者 0 名 GitHub で見る
api: vertex-ai
主要言語
Python
スター
905
フォーク
465
平均マージ
1日 13時間
マージ済み PR(30日)
44

説明

#### Environment details

- OS type and version:
- Python version: 3.8
- pip version: 20.1.1
- `google-cloud-aiplatform` version: `google-cloud-aiplatform>=1.7.1,<2.0.0`

#### Steps to reproduce

1. Create a Python file in an environment where `google-cloud-aiplatform` is installed
2. Type: `from google.cloud.aiplatform.models import Model`
3. Run it with `time python`

#### Code example

```python
from google.cloud.aiplatform.models import Model
```

#### Stack trace
```
real 0m0.836s
user 0m1.085s
sys 0m1.045s
```

Compare it with an import of an entire package such as `pandas` (`import pandas as pd`):
```
real 0m0.271s
user 0m0.541s
sys 0m0.930s
```

I originally opened this issue in [Apache Airflow](https://github.com/apache/airflow/discussions/29615) repository, and I was referred to here. The time of import makes parsing of Airflow DAGs that utilize Vertex AI operators significantly slower.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。