Skip to content

[qoc] Update docs around TrainingInputBatch - #1995

Merged
CharlieFRuan merged 3 commits into
mainfrom
qoc-0805-shape
Aug 6, 2026
Merged

[qoc] Update docs around TrainingInputBatch#1995
CharlieFRuan merged 3 commits into
mainfrom
qoc-0805-shape

Conversation

@CharlieFRuan

Copy link
Copy Markdown
Member

Add docs to class TrainingInput.

Also fix shape annotation from seq_len to response_len for those fields.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request updates type annotations and documentation across several files to clarify that response-level tensors (such as loss_mask, response_mask, and action_log_probs) have a width of response_len (covering only response tokens) rather than seq_len (which spans both prompt and response). The review feedback correctly identifies that loss_mask is annotated as an Integer tensor in both TrainingInput and trainer.py docstrings, whereas its actual runtime type is Float, and suggests correcting these annotations to prevent type-checking discrepancies.

Comment thread skyrl/backends/skyrl_train/training_batch.py Outdated
Comment thread skyrl/train/trainer.py Outdated
CharlieFRuan and others added 2 commits August 5, 2026 17:54
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@CharlieFRuan
CharlieFRuan merged commit 7fee019 into main Aug 6, 2026
1 check passed
@CharlieFRuan
CharlieFRuan deleted the qoc-0805-shape branch August 6, 2026 00:55
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