Skip to content

Commit 5c19320

Browse files
committed
chore: cap eval Vertex AI dependency below 2
1 parent b018062 commit 5c19320

2 files changed

Lines changed: 27 additions & 4 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ optional-dependencies.e2b = [
192192
]
193193
optional-dependencies.eval = [
194194
"gepa>=0.1",
195-
"google-cloud-aiplatform[evaluation]>=1.148",
195+
"google-cloud-aiplatform[evaluation]>=1.148,<2",
196196
"google-cloud-texttospeech>=2.37",
197197
"jinja2>=3.1.4,<4", # For eval template rendering
198198
"nltk!=3.10.1", # Transitive via rouge-score; 3.10.1's import hook breaks any venv living inside the working directory (reverted upstream in nltk/nltk#3732).

tests/unittests/test_release_dependencies.py

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@
2828
* ``google-genai`` MUST exclude 2.11 and floor at 2.12.1 or later, since that
2929
release is the first whose types module defers the optional MCP server stack
3030
instead of importing it at Agent startup.
31-
* The ``all`` extra MUST stay the union of every extra that unlocks a runtime
32-
feature, so that ``pip install "google-adk[all]"`` cannot silently stop
33-
installing a feature's dependencies.
31+
* ``all`` MUST stay the union of every extra that unlocks a runtime feature, so
32+
that ``pip install "google-adk[all]"`` cannot silently stop installing a
33+
feature's dependencies.
34+
* The ``eval`` extra MUST keep ``google-cloud-aiplatform`` below its 2.x major
35+
line, matching the other runtime extras that depend on it.
3436
* Every ``<=`` upper bound MUST name the release the tests run against, so
3537
that raising one cannot claim support for a release nothing installed.
3638
"""
@@ -331,6 +333,27 @@ def test_main_deps_require_lazy_mcp_google_genai_release(
331333
)
332334

333335

336+
def test_eval_extra_caps_google_cloud_aiplatform_at_v2(
337+
pyproject: dict,
338+
) -> None:
339+
"""The eval extra must not resolve google-cloud-aiplatform 2.x."""
340+
specifier = _requirement_specifier(
341+
pyproject['project']['optional-dependencies']['eval'],
342+
'google-cloud-aiplatform',
343+
)
344+
345+
assert specifier is not None, (
346+
'The eval extra must declare google-cloud-aiplatform so its evaluation '
347+
'dependency remains explicitly constrained.'
348+
)
349+
assert any(
350+
clause.operator == '<' and Version(clause.version) == Version('2')
351+
for clause in specifier
352+
), 'The eval extra must keep google-cloud-aiplatform below the 2.x major line.'
353+
assert Version('1.148') in specifier
354+
assert Version('2.0.0') not in specifier
355+
356+
334357
def test_inclusive_upper_bounds_ignores_other_operators() -> None:
335358
"""Only ``<=`` names a release as supported, and the highest one wins."""
336359
bounds = _inclusive_upper_bounds({

0 commit comments

Comments
 (0)