YAshhh29 opened a new pull request, #69385:
URL: https://github.com/apache/airflow/pull/69385
The Google provider unconditionally base-depended on
`google-cloud-aiplatform[evaluation]`, which transitively pulls in
`litellm`, `scikit-learn`, and `ruamel-yaml`. That stack is only used by
Vertex AI generative-model evaluation (`GenerativeModelHook.get_eval_task`
/ `run_evaluation` / `RunEvaluationOperator`). Users who install the
provider only for `GCSHook` / `BigQueryHook` / other non-Vertex operators
still got the whole ML/eval stack, growing image sizes and adding CVE
noise from `litellm`'s proxy-server surface.
### What changes
- `providers/google/pyproject.toml`
- Base dep is now `google-cloud-aiplatform>=1.155.0` (no `[evaluation]`).
- New optional extra `vertex-eval` re-adds
`google-cloud-aiplatform[evaluation]>=1.155.0` for users who run
Vertex AI evaluation.
- `providers/google/src/.../vertex_ai/generative_model.py`
- Moves the `vertexai.preview.evaluation` import out of module top-level
(`TYPE_CHECKING` for the annotations) and into a lazy helper
`_import_vertex_evaluation()` that raises a clear `ImportError`
pointing users at the `[vertex-eval]` extra when the underlying
package is missing.
- `providers/google/docs/changelog.rst`: user-facing note under Changelog
header describing the migration and the install command.
- `providers/google/docs/index.rst`: updated the dependency table to
reflect the base dep no longer using the `[evaluation]` extra.
- `providers/google/tests/.../test_generative_model.py`: regression test
that patches `sys.modules["vertexai.preview.evaluation"] = None` and
asserts `_import_vertex_evaluation()` raises with the
`[vertex-eval]` install hint.
### Migration
Users who exercise Vertex AI generative-model evaluation must install:
```bash
pip install 'apache-airflow-providers-google[vertex-eval]'
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]