feat: add post-loader data contract validation for SFT/DPO/Online RL/Agentic - #429
Open
Hpward-Ling wants to merge 4 commits into
Open
feat: add post-loader data contract validation for SFT/DPO/Online RL/Agentic#429Hpward-Ling wants to merge 4 commits into
Hpward-Ling wants to merge 4 commits into
Conversation
added 4 commits
July 30, 2026 18:16
…AI#214 Add explicit Limitations section covering bounded scan, post-loader-only validation, structural (not semantic) checks, read-only behavior, and missing-vs-null distinction. Completes the documentation requirements of issue inclusionAI#214.
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?
Adds a post-loader data contract validator that checks required fields, types,
list lengths, and nested messages for SFT, DPO, Online RL, and agentic inputs
after the user dataset loader runs, before expensive model/worker
initialization. Errors are aggregated into a bounded report (instead of stopping
at the first), with sample index, field path, expected/actual type, and a
concrete correction hint per error.
Three entry points:
from areno.api import validate_contract→ returns aContractReportwith.ok,.errors,.warnings,.total_scanned.areno data inspect --dataset-path ... --contract --mode {sft,dpo,online_rl,agentic}with
--jsonfor CI-friendly structured output.areno train ... --validate-data-contractruns thesame validator after dataset loading, before model init. Default is
--no-validate-data-contract(backward compatible).Related issue
Fixes #214
Type of change
How was it tested?
All tests are CPU-only, no GPU or external services required.