Make google-cloud-aiplatform[evaluation] an optional extra in providers-google#69399
Open
gingeekrishna wants to merge 1 commit into
Open
Conversation
jroachgolf84
suggested changes
Jul 5, 2026
jroachgolf84
left a comment
Collaborator
There was a problem hiding this comment.
There seem to be changes for two issues in this PR. Can you please move these into two, separate PRs?
f23a227 to
b1640db
Compare
Author
…itellm/scikit-learn bloat The [evaluation] extra of google-cloud-aiplatform transitively installs litellm, scikit-learn, ruamel-yaml and a full HF/tokenizers chain that is irrelevant to users of GCSHook, BigQueryHook, or most other Google provider features. It also surfaces a steady stream of litellm proxy CVEs in pip-audit for every provider user, even when litellm is never used. Changes: - pyproject.toml: drop [evaluation] from the base dep; add a new "vertex-ai-evaluation" optional extra that provides it for users who need the Rapid Evaluation API. - generative_model.py: guard the vertexai.preview.evaluation import with try/except; raise an informative ImportError from get_eval_task() and run_evaluation() when the extra is not installed, pointing users to pip install apache-airflow-providers-google[vertex-ai-evaluation]. Fixes: apache#69323
b1640db to
5d0d1d1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Closes #69323
apache-airflow-providers-googledeclaresgoogle-cloud-aiplatform[evaluation]as an unconditional base dependency. The[evaluation]extra transitively installs:This bloats the install for every user of the provider, even those who only need
GCSHook,BigQueryHook, or other features unrelated to Vertex AI evaluation. It also surfaces a constant stream oflitellmproxy-server CVEs inpip-auditfor all provider users.Changes
providers/google/pyproject.tomlgoogle-cloud-aiplatform[evaluation]>=1.155.0togoogle-cloud-aiplatform>=1.155.0vertex-ai-evaluationthat providesgoogle-cloud-aiplatform[evaluation]>=1.155.0for users who need the Rapid Evaluation APIgenerative_model.pyfrom vertexai.preview.evaluation import EvalResult, EvalTaskwithtry/except ImportErrorget_eval_task()andrun_evaluation()raise an informativeImportErrorwhen the extra is not installed, pointing users topip install 'apache-airflow-providers-google[vertex-ai-evaluation]'Upgrade path
Users who rely on Vertex AI evaluation operators (
RunEvaluationOperatoretc.) add the explicit extra:pip install 'apache-airflow-providers-google[vertex-ai-evaluation]'All other users get a smaller, CVE-quieter install with no behaviour change.