googleapis / googleapis/python-aiplatform
Importing class `Model` from `google.cloud.aiplatform.models` is slow
- Lingua principale
- Python
- Stelle
- 905
- Fork
- 465
- Merge medio
- 1g 13h
- PR unite (30g)
- 44
Descrizione
#### 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.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.