You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Importing class Model from google.cloud.aiplatform.models is slow #1994
Create a Python file in an environment where google-cloud-aiplatform is installed
Type: from google.cloud.aiplatform.models import Model
Run it with time python
Code example
fromgoogle.cloud.aiplatform.modelsimportModel
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 repository, and I was referred to here. The time of import makes parsing of Airflow DAGs that utilize Vertex AI operators significantly slower.
Indeed. Why don't you raise an issue ti google library @ethanjyx ? - it sounds strange to have an issue in airflow about slow import of some libarary. It should be created there. Can you open an issue - or check if there is one there. Until then I will convert it into a discussion - as there is nothing in Airflow we can do about it.
Activity
potiuk commentedon Feb 24, 2023
Indeed. It's super slow.
dvmorris commentedon Sep 27, 2023
Any updates on this? I'm experiencing something similar.
ethanjyx commentedon Oct 26, 2024
it takes 3 seonds to import, which is insane
potiuk commentedon Oct 26, 2024
Indeed. Why don't you raise an issue ti google library @ethanjyx ? - it sounds strange to have an issue in airflow about slow import of some libarary. It should be created there. Can you open an issue - or check if there is one there. Until then I will convert it into a discussion - as there is nothing in Airflow we can do about it.
potiuk commentedon Oct 26, 2024
Ah... It's already in googleapis 🤯 .... Yes. Let me add to it, it is insane.
pjsg commentedon May 15, 2025
Is there any progress on this?
This is on MacOS