Skip to content

docs: correct stale prose about the pre-tokenized on-policy path#863

Draft
WindChimeRan wants to merge 1 commit into
vllm-project:mainfrom
WindChimeRan:docs/regen-output-text-field
Draft

docs: correct stale prose about the pre-tokenized on-policy path#863
WindChimeRan wants to merge 1 commit into
vllm-project:mainfrom
WindChimeRan:docs/regen-output-text-field

Conversation

@WindChimeRan

@WindChimeRan WindChimeRan commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Purpose

Two docs describe behaviour the code stopped having when on-policy regeneration started emitting pre-tokenized rows.

1. The output row schema in the tutorial. scripts/response_regeneration/script.py:510 writes "text", a decode of input_ids. The tutorial still shows "conversations", a list of role/content messages, in both example rows, and its metadata blocks omit the sampling_params key the script emits. #808 made this change and updated docs/cli/response_regeneration.md, which is correct today; the tutorial was missed.

2. The prepare_data.py module docstring. It states the script applies a chat template and produces a loss mask, unconditionally. Since #729, rows carrying input_ids and loss_mask take the pre-tokenized branch at preprocessing.py:648 and skip both steps -- they are truncated to --seq-length and filtered, nothing more. The docstring now notes the exception.

No code or behaviour change.

Tests

Docs and one module docstring.

  • ruff check scripts/prepare_data.py passes
  • ruff format --check scripts/prepare_data.py passes
  • python -m mdformat --check docs/user_guide/tutorials/response_regeneration.md passes

Field names verified against script.py:500-519; the pre-tokenized branch against preprocessing.py:541 and _passthrough_pretokenized at :499.

Checklist

I have filled in:

  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan/results, such as providing test command and pasting the results.
  • (Optional) The necessary documentation update.
  • I (a human) have written or reviewed the code in this pr to the best of my ability.

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: bbeec669-232f-4c9e-8c05-9da6af93c206

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mergify mergify Bot added the documentation Improvements or additions to documentation label Jul 25, 2026
@mergify

mergify Bot commented Jul 25, 2026

Copy link
Copy Markdown

Merge Protections

🔴 1 of 1 protections blocking · waiting on 👀 reviews

Protection Waiting on
🔴 Require approval from approved reviewers list 👀 reviews

🔴 Require approval from approved reviewers list

Waiting for any of

  • approved-reviews-by = dsikka
  • approved-reviews-by = fynnsu
  • approved-reviews-by = orestis-z
  • approved-reviews-by = rahul-tuli
  • approved-reviews-by = shanjiaz
This rule is failing.

All pull requests must have at least one approving review from a member of the approved reviewers list before merging.

  • any of:
    • approved-reviews-by = dsikka
    • approved-reviews-by = fynnsu
    • approved-reviews-by = orestis-z
    • approved-reviews-by = rahul-tuli
    • approved-reviews-by = shanjiaz

@WindChimeRan
WindChimeRan force-pushed the docs/regen-output-text-field branch from e0d3da8 to a24203d Compare July 25, 2026 20:28
Two places describe behaviour the code stopped having.

The response-regeneration tutorial documents the output row as carrying
`conversations`, a list of role/content messages. vllm-project#808 replaced that with
`text`, a decode of `input_ids`, and updated docs/cli/response_regeneration.md
but not the tutorial. Both example rows are corrected, and the `metadata`
blocks gain the `sampling_params` key the script emits.

scripts/prepare_data.py's module docstring claims it always applies a chat
template and produces a mask. Since vllm-project#729, rows that already carry `input_ids`
and `loss_mask` skip both steps; they are truncated and filtered only. Note the
exception rather than leaving the docstring stating it unconditionally.

No code or behaviour change.

Signed-off-by: Ranran Haoran Zhang <ranzhang@redhat.com>
@WindChimeRan
WindChimeRan force-pushed the docs/regen-output-text-field branch from a24203d to 070352e Compare July 25, 2026 21:34
@WindChimeRan WindChimeRan changed the title docs(regen): correct the output row schema in the tutorial docs: correct stale prose about the pre-tokenized on-policy path Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant