Skip to content

Centralize PufferDrive Configuration and Evaluation Validation - #582

Open
Victorbares wants to merge 11 commits into
3.0from
vb/args_check
Open

Centralize PufferDrive Configuration and Evaluation Validation#582
Victorbares wants to merge 11 commits into
3.0from
vb/args_check

Conversation

@Victorbares

@Victorbares Victorbares commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

What

  • Add structured schema validation for the complete PufferDrive configuration.

  • Validate field ranges, cross-field relationships, enums, and filesystem resources.

  • Apply validation consistently across training, evaluation, export, and benchmark configuration.

  • Refactor benchmark argument merging so CLI overrides are validated after all configuration sources
    are combined.

  • Simplify redundant validation in the Python environment wrapper.

  • Expand unit and evaluation test coverage for invalid and merged configurations.

Why

Fail early with clear configuration errors before invalid values reach the simulator or training
loop. This also makes benchmark evaluation more reliable by validating the final resolved
configuration, including checkpoint settings, benchmark overlays, environment overrides, and CLI
arguments.

- Removed unused imports and functions in evaluation_utils.py.
- Simplified benchmark configuration loading by integrating validation functions.
- Enhanced error handling for missing environment fields in benchmark configurations.
- Updated benchmark argument building to include final validation and CLI overrides.
- Improved test coverage for benchmark configuration validation, including edge cases.
- Adjusted smoke tests to disable evaluators during runs.
- Refined unit tests for configuration schema validation, ensuring robustness against invalid inputs.
@Victorbares Victorbares changed the title Refactor evaluation utilities and config validation Centralize PufferDrive Configuration and Evaluation Validation Sep 1, 2026
@Victorbares
Victorbares marked this pull request as ready for review September 1, 2026 13:18
"route": binding.GOAL_SOURCE_ROUTE,
"map": binding.GOAL_SOURCE_MAP,
"gt": binding.GOAL_SOURCE_GT,
}[goal_source]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

unless I'm missing something, a wrong key won't talk anymore apart from the invalid dictionary key error? I prefer to have the error speak clearly about what's the problem.

Comment thread pufferlib/pufferl.py
Comment thread pufferlib/config_schema.py
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.

3 participants