Skip to content

fix(ci): add pinned deepeval and autoevals to dev group - #609

Merged
jariy17 merged 1 commit into
mainfrom
fix/ci-pin-deepeval-dev
Jul 31, 2026
Merged

fix(ci): add pinned deepeval and autoevals to dev group#609
jariy17 merged 1 commit into
mainfrom
fix/ci-pin-deepeval-dev

Conversation

@jariy17

@jariy17 jariy17 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Problem

ci.yml unit tests have been failing on main since 9b7d38e (#568), on all four Python versions:

ERROR tests/.../third_party/deepeval/test_adapter.py
ERROR tests/.../third_party/deepeval/test_error_handling.py
!!!!!! Interrupted: 2 errors during collection !!!!!!
Process completed with exit code 2

src/bedrock_agentcore/evaluation/custom_code_based_evaluators/third_party/deepeval/adapter.py:6 imports deepeval at module scope:

from deepeval.errors import MissingTestCaseParamsError
from deepeval.metrics import BaseConversationalMetric, BaseMetric
from deepeval.test_case.conversational_test_case import Turn

But deepeval was not in the dev dependency group, and ci.yml installs via uv sync --dev. So the tests could not even be collected — pytest exits 2, and fail-fast cancels the whole matrix.

The autoevals sibling adapter imports nothing at module scope (only inside functions), which is why only the deepeval tests error. That asymmetry is the underlying issue.

Change

Add both to the dev group, pinned with an upper bound so a new major version cannot drift in:

"deepeval>=3.5.0,<5.0.0",
"autoevals>=0.3.0,<1.0.0",

Also corrects an unsatisfiable floor in the deepeval extra since ConversationalTurn was introduced in v3

Testing

  • uv lock regenerated; diff adds only the two packages, no other version moved
  • uv sync --dev (CI's exact command) then uv run pytest tests/ on Python 3.10 → the 2 collection errors are gone; 2930 passed
  • Third-party adapter suite passes at both the pinned floor (deepeval==3.5.0, autoevals==0.3.0) and current latest (deepeval==4.1.4) → 108 passed each
  • 4 unrelated tests (test_label_required_without_error_code, test_evaluation_with_empty_trajectory, 2 × TestAsyncMode) fail identically on clean main — pre-existing, out of scope here

Follow-up worth considering

deepeval is declared optional in pyproject.toml, yet importing the adapter module hard-requires it. Making the deepeval adapter lazy-import like the autoevals one would mean an optional extra can't break collection again. Happy to file separately.

Separate from #608, which fixes the integration-test workflow.

The deepeval adapter imports deepeval at module scope
(src/.../third_party/deepeval/adapter.py:6), but deepeval was absent from
the dev dependency group. ci.yml runs 'uv sync --dev', so the deepeval
unit tests could not be collected, exiting pytest with code 2 and
cancelling the whole matrix.

Both are pinned with an upper bound so major versions cannot drift in.

The deepeval extra's >=2.0.0 floor was also unsatisfiable: the adapter
imports deepeval.test_case.conversational_test_case.Turn, which does not
exist before 3.0.8, and deepeval <3.5.0 pins rich <14, conflicting with
strands-agents-evals (rich >=14). Corrected to >=3.5.0.
@jariy17
jariy17 requested a review from a team July 30, 2026 22:47
@github-actions github-actions Bot added the size/xs PR size: XS label Jul 30, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Jul 30, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Jul 30, 2026
@github-actions github-actions Bot added size/xs PR size: XS and removed size/xs PR size: XS labels Jul 30, 2026
@jariy17
jariy17 merged commit 70165d9 into main Jul 31, 2026
36 of 42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xs PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants