Skip to content

Running eval through pytest is not saving evalset_result.json file #2602

Closed

Description

@CloudIQTechnologies

** Please make sure you read the contribution guide and file the issues in the right place. **
Contribution guide.

Describe the bug
When I run the evals either through adk web or adk eval command, I see the evalset_result.json file getting stored under .adk/eval_history folder under the agent folder. But which I run the eval through pytest, the result.json is not getting stored

To Reproduce
Steps to reproduce the behavior:

  1. Install '...'
  2. Run '....'
  3. Open '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.
The evalset_result.json should get stored just like what happens when we run the evals through adk web or through adk eval command

Screenshots
If applicable, add screenshots to help explain your problem.

Image

Desktop (please complete the following information):

  • OS: Windows
  • Python version(python -V): 3.12.10
  • ADK version(pip show google-adk): 1.11.0

Model Information:
For example, which model is being used.
gemini-2.5-pro

Additional context
Add any other context about the problem here.

Activity

  1. added theissue type on Aug 19, 2025
  2. hangfei commented on Nov 4, 2025

    @hangfei
    Collaborator

    This is not supported. This will be a a feature request.

  3. changed the issue type fromtoon Nov 4, 2025
  4. sivakumar-d3v commented on Nov 24, 2025

    @sivakumar-d3v

    Noted this issue; commenting to receive updates when it’s fixed

  5. ftnext commented on Jan 14, 2026

    @ftnext
    Contributor

    implementation example
    #2652 (comment)

  6. klateefa commented on Feb 11, 2026

    @klateefa

    @CloudIQTechnologies Thanks for the update. The request is currently being reviewed, and I will let you know if anything further is needed. Thank you for your understanding.

  7. added
    needs review[Status] The PR/issue is awaiting review from the maintainer
    on Feb 11, 2026
  8. ftnext commented on Feb 11, 2026

    @ftnext
    Contributor

    #4414 resolves this issue like:

    @pytest.mark.asyncio
    async def test_with_single_test_file_saves_eval_set_result(
        tmp_path,
    ):
      """Persists eval set results with derived app_name when app_name is omitted."""
      eval_set_results_manager = LocalEvalSetResultsManager(
          agents_dir=str(tmp_path)
      )
      await AgentEvaluator.evaluate(
          agent_module="tests.integration.fixture.home_automation_agent",
          eval_dataset_file_path_or_dir=(
              "tests/integration/fixture/home_automation_agent/simple_test.test.json"
          ),
          num_runs=2,
          eval_set_results_manager=eval_set_results_manager,
      )
  9. DeanChensj commented on Jun 24, 2026

    @DeanChensj
    Collaborator

    This issue has been resolved in newer versions of the library (PR #4414 introduced LocalEvalSetResultsManager to persist results when running via pytest).

  10. ftnext commented on Jun 24, 2026

    @ftnext
    Contributor

    @DeanChensj Thanks for the update. I may be missing something, but PR #4414 still appears to be open and not merged yet.

    Since #4414 is the PR that adds LocalEvalSetResultsManager support to AgentEvaluator for pytest-based eval result persistence, I don’t think the fix is available on main yet. I also don’t see the new eval_set_results_manager argument or the related persistence logic in AgentEvaluator on the current main branch.

    Could you clarify why this issue was closed before #4414 was merged or otherwise released?

  11. DeanChensj commented on Jun 25, 2026

    @DeanChensj
    Collaborator

    Thanks @ftnext for the context, reopening.

  12. self-assigned this
    on Aug 6, 2026
  13. added 2 commits that reference this issue on Aug 11, 2026
    76027dd
    ef55584
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

eval[Component] This issue is related to evaluationneeds review[Status] The PR/issue is awaiting review from the maintainer

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions