Skip to content

fix(verl): preserve rollout input fields from later dataset rows - #720

Open
FangTaC wants to merge 3 commits into
microsoft:mainfrom
FangTaC:fix/preserve-rollout-input-fields
Open

FangTaC wants to merge 3 commits into
microsoft:mainfrom
FangTaC:fix/preserve-rollout-input-fields

Conversation

@FangTaC

@FangTaC FangTaC commented Dec 2, 2026

Copy link
Copy Markdown

Fixes #719.

LoadedDataset used the first row to infer columns, so rollout inputs silently lost fields introduced by later rows. Build columns from all rows and keep missing values as None. A row without extra_info still gets the default index.

The regression uses the veRL collator to check that a later row's hint reaches the batch and that the two rows keep indices 0 and 9. The trainer guide documents how missing fields are represented.

Validation

  • python -m pytest -q tests/verl/test_dataset.py tests/verl/test_agl_rollout_manager.py — 14 passed on Ubuntu (WSL) with the locked verl-cpu dependencies. The new test fails with KeyError: 'hint' before the fix.
  • Ruff lint and format checks for both changed Python files, python scripts/check_headers.py, and git diff --check passed.
  • mkdocs build --strict passed. No GPU training run was needed for this data-loading regression.

Codex assisted with investigation, implementation, and local verification.

Copilot AI balanced review requested due to automatic review settings December 2, 2026 04:24

Copilot AI left a comment

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.

🟢 Approval recommended

No active review issues were identified for the change preserving rollout fields introduced in later dataset rows.

No open issues 🎉

What changed in this PR

Fixes #719 by preserving in-memory rollout input fields that first appear in later dataset rows.

Changes:

  • Builds columns from all rows, filling missing values with None.
  • Preserves the default index when extra_info is missing.
  • Adds a veRL collator regression test and documents missing-field behavior.
File Description
tests/​verl/​test_dataset.py Verifies later-row hints and indices survive collation.
docs/​20-trainer-configuration.md Documents field preservation and missing values.
agentlightning/​verl/​dataset.py Collects all columns and handles null metadata.

Review effort: Balanced

@FangTaC

FangTaC commented Dec 2, 2026

Copy link
Copy Markdown
Author

FangTaC please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement
@microsoft-github-policy-service agree

This branch has not been deployed

No deployments
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.

In-memory datasets drop rollout input fields missing from the first row

2 participants