Skip to content

Move dataset hydration into Python config package.#15

Merged
ericwindmill merged 2 commits intomainfrom
move-hydration-logic
Mar 30, 2026
Merged

Move dataset hydration into Python config package.#15
ericwindmill merged 2 commits intomainfrom
move-hydration-logic

Conversation

@ericwindmill
Copy link
Copy Markdown
Collaborator

…ared dataset_config_python.hydrate module

Issue Link:

What is the link to the issue this cherry-pick is addressing?

https://github.com/flutter/flutter/issues/< Replace with issue link here >

It's a good idea to open an issue first for discussion.

  • All tests pass
  • Appropriate inline docstrings changes are included in the PR
  • Appropriate documentation changes to the docs site are included in the PR

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request centralizes the logic for converting configuration dictionaries into Inspect AI objects by introducing a new dataset_config_python.hydrate module. By moving this responsibility out of the dash_evals runner, the codebase achieves better separation of concerns and provides a single source of truth for hydration that can be shared across different tools in the repository. This change also prepares the project for the future deprecation of the redundant Dart configuration package.

Highlights

  • Consolidation of Dataset Hydration: Moved dataset, MCP server, and skill hydration logic from the dash_evals runner into a new dataset_config_python.hydrate module to serve as a shared, canonical implementation.
  • Improved Code Reusability: Enabled external consumers (like yardstick) to utilize the same configuration-to-object conversion logic, reducing duplication and ensuring consistency.
  • Documentation Updates: Updated repository documentation and README files to reflect the new hydration module and signal the eventual deprecation of the Dart-based configuration package.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the configuration hydration logic by moving core helper functions—including dataset building, MCP server creation, and skill tool generation—from dash_evals into the shared dataset_config_python package. Documentation and dependencies are updated to reflect this architectural shift and the planned deprecation of the Dart configuration package. Review feedback suggests minor corrections for capitalization and spelling consistency, and recommends removing redundant tests in dash_evals that now overlap with the new test suite in dataset_config_python.

# Dataset Config management library - Dart implementation

> [!CAUTION]
> This library will be deprecated eventually. It almost entirely overlaps with the Python implementation, and the python lib should be considered the canonical package. No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency in capitalization, could you please change python lib to Python lib?

Suggested change
> This library will be deprecated eventually. It almost entirely overlaps with the Python implementation, and the python lib should be considered the canonical package.
> This library will be deprecated eventually. It almost entirely overlaps with the Python implementation, and the Python lib should be considered the canonical package.

An Inspect AI dataset object.

Raises:
ValueError: If the dataset format is unrecognised or required fields
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There's a small spelling inconsistency here. To align with the American English spelling used elsewhere in the codebase, please change unrecognised to unrecognized.

Suggested change
ValueError: If the dataset format is unrecognised or required fields
ValueError: If the dataset format is unrecognized or required fields

}
mock_ds = MagicMock(name="json_dataset_result")
with patch("dash_evals.runner.json_runner.json_dataset", return_value=mock_ds) as mock_fn:
with patch("dataset_config_python.hydrate.json_dataset", return_value=mock_ds) as mock_fn:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

These tests for _build_dataset appear to be redundant. Since the _build_dataset function was moved to the dataset_config_python package, its tests have also been correctly added in the new packages/dataset_config_python/tests/test_hydrate.py file.

To avoid test duplication and future maintenance issues, please consider removing the TestBuildDataset* classes from this file, as they are now testing an imported function whose source is tested elsewhere.

@ericwindmill ericwindmill merged commit 5c2bf28 into main Mar 30, 2026
7 checks passed
@ericwindmill ericwindmill deleted the move-hydration-logic branch March 30, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant