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
Installing google-cloud-aiplatform with the [agent-engines] extra results in a ModuleNotFoundError for pandas, even when not using evaluation features.
Any import from vertexai._genai, such as from vertexai._genai.types import AgentEngine, triggers a chain reaction that imports vertexai._genai.evals, which has a top-level import pandas.
This makes pandas a hard requirement for the [agent-engines] extra, when it should be an optional dependency only for the [evaluation] extra. The import should be deferred until evaluation-specific functions are actually called
=================================== ERRORS ====================================
_________ ERROR collecting tests/integration/test_agent_engine_app.py __________
ImportError while importing test module '/github/workspace/test-software-bug-assistan/tests/integration/test_agent_engine_app.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.11/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/integration/test_agent_engine_app.py:21: in <module>
from software_bug_assistant.agent_engine_app import AgentEngineApp
software_bug_assistant/agent_engine_app.py:27: in <module>
from vertexai._genai.types import AgentEngine, AgentEngineConfig
.venv/lib/python3.11/site-packages/vertexai/_genai/__init__.py:17: in <module>
from . import evals
.venv/lib/python3.11/site-packages/vertexai/_genai/evals.py:27: in <module>
import pandas as pd
E ModuleNotFoundError: No module named 'pandas'
=========================== short test summary info ============================
ERROR tests/integration/test_agent_engine_app.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
============================== 1 error in 10.90s ===============================
make: *** [Makefile:51: test] Error 2
Pandas should be needed only when using the evaluation extra.
Activity
eliasecchig commentedon Oct 16, 2025
cc @sasha-gitg @yeesian
fix: Import pandas lazily in the Gen AI SDK `_gcs_utils` module.
fix: Import pandas lazily in the Gen AI SDK `_gcs_utils` module.