Skip to content

docs: add normalized row example and failure cases to dataset loader docs - #451

Open
CalebWang0126 wants to merge 1 commit into
inclusionAI:mainfrom
CalebWang0126:docs/dataset-loader-failure-cases
Open

docs: add normalized row example and failure cases to dataset loader docs#451
CalebWang0126 wants to merge 1 commit into
inclusionAI:mainfrom
CalebWang0126:docs/dataset-loader-failure-cases

Conversation

@CalebWang0126

Copy link
Copy Markdown

Summary

Refs #42. The dataset loader tutorial landed earlier, but two of the issue's acceptance criteria are still unmet in docs/cli/dataset_loaders.rst:

  • "Show a small JSONL or Hugging Face dataset example."
  • "Includes failure cases for missing prompt/answer/reward fields."

This PR closes that gap. Docs-only; no CLI changes.

Changes (docs/cli/dataset_loaders.rst)

  • Normalized row example: a two-row canonical JSONL snippet (prompt + solutions) that needs no loader, plus how GSM8K-style Hugging Face rows reach the same shape through examples/math/dataset_loader.py, and how solutions flows into the reward as record.answer.
  • Common failure cases: the exact startup errors, verified against current code:
    • missing prompt in a rollout row -> dataset row must contain \prompt`; use --dataset-loader-fn to normalize raw rows (areno/api/trainer.py`)
    • missing prompt/response in SFT rows -> SFT dataset loader must return rows with \prompt` and `response`...; None/empty rows are skipped and an all-skipped dataset fails with SFT dataset produced no valid training rows after filtering (areno/api/trainers/sft.py`)
    • missing chosen/rejected in DPO rows -> DPO dataset row must contain \chosen` and `rejected` (areno/api/trainers/dpo.py`)
    • missing solutions for the math reward -> math reward expects \record.answer`... (examples/math/math_verify_reward.py`)

Verification

  • Error strings quoted verbatim from the current implementation.
  • sphinx-build -b html -E docs builds with zero warnings.
  • Uses the existing math examples as source references, per the acceptance criteria.

…docs

Complete the remaining acceptance criteria from inclusionAI#42: show a small canonical JSONL example and document the exact startup errors for missing prompt, response, chosen/rejected, and solutions fields.
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