googleapis / googleapis/python-aiplatform
Importing class `Model` from `google.cloud.aiplatform.models` is slow
- Ngôn ngữ chính
- Python
- Star
- 905
- Fork
- 465
- Merge trung bình
- 1 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 44
Mô tả
#### 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.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.