Fix/issue214 Validate post-loader data contracts by training mode - #427
Open
pzx-dny wants to merge 2 commits into
Open
Fix/issue214 Validate post-loader data contracts by training mode#427pzx-dny wants to merge 2 commits into
pzx-dny wants to merge 2 commits into
Conversation
added 2 commits
July 29, 2026 15:03
Add post-loader data contract validation that checks dataset schema before expensive model/worker initialization. Supports SFT, DPO, online RL (GSPO/GRPO/PPO), and agentic modes with bounded error collection and human-readable/JSON output formatting.
Fix spelling in filenames: - areno/api/data_vaidation.py -> data_validation.py - tests/test_data_vaildation_cpu.py -> test_data_validation_cpu.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Add post-loader data contract validation that checks dataset schema before expensive model/worker initialization. Supports SFT, DPO, online RL (GSPO/GRPO/PPO), and agentic modes with bounded error collection and human-readable/JSON output formatting.
Key changes:
areno/api/data_validation.py— core validation module (stdlib only, no new dependencies)areno/cli/train.py:run()after dataset loading, beforebuild_trainer()tests/test_data_validation_cpu.py— 26 CPU unit testsBehavior: Valid data passes silently. Invalid data prints aggregated errors (sample index, field path, expected/actual type, fix hint) to stderr and raises
click.UsageErrorto block training. No new CLI flags or subcommands.Related issue
issue#214
How was it tested?
$ pytest tests/test_data_validation_cpu.py -v ============================== 26 passed in 0.04s ==============================Test coverage:
Hardware limitation: macOS without GPU — tests load the module directly to bypass the
areno.apiimport chain (which requires torch). On Linux GPU environments,from areno.api.data_validation import ...works directly.Checklist
pytest tests/ -k cpu).Breaking change details
No breaking changes. Validation runs by default but is completely silent for valid data — no impact on existing behavior.