Repository navigation
(1/2) refactor(rollout): drop --generate-multi-samples and its per-turn sample semantics #1916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
2c13d57
c90d663
1fdc86b
eae3bdf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -86,14 +86,14 @@ Helpers: | |
|
|
||
| - `compute_prompt_ids_from_sample` and `compute_request_payload` from | ||
| `miles/rollout/generate_utils/generate_endpoint_utils.py` build `/generate` requests. | ||
| - For multi-sample outputs, set `--generate-multi-samples` and return a list. | ||
| - Returning a `list[Sample]` from a generate function is supported natively; no flag is needed. | ||
|
|
||
| ### Reference generators | ||
|
|
||
| - **`single_turn.py`**: single-turn generation via `/generate`. Text or multimodal prompts. | ||
| - **`multi_turn.py`**: multi-turn tool calling via `/generate`. Adds CLI flags | ||
| `--generate-max-turns`, `--generate-tool-specs-path`, `--generate-tool-call-parser`, | ||
| `--generate-execute-tool-function-path`, `--generate-multi-samples`. | ||
| `--generate-execute-tool-function-path`. | ||
| - **`benchmarkers.py`**: forces random output sequence length for benchmarking. | ||
|
|
||
| --- | ||
|
|
@@ -181,6 +181,18 @@ remain a `messages` list. SGLang handles templating server-side. | |
|
|
||
| </Warning> | ||
|
|
||
| <Warning> | ||
|
|
||
| **Agentic output is a `list[Sample]`.** `agentic_tool_call.generate` always returns a list | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not always actually.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated in eae3bdf: I removed the list-only agentic warning. agentic_tool_call.generate now returns the merged scalar Sample on success and aborted paths, while GenerateFnOutput.samples continues to support both shapes for custom generators. |
||
| (one merged TITO sample per linear run today). Consequences: | ||
|
|
||
| - A custom reward model (`--custom-rm-path`) is called in batch form with a | ||
| `list[Sample]` argument; it must handle that shape. | ||
| - `--group-rm`, `--partial-rollout`, and `--recompute-logprobs-via-prefill` are not | ||
| supported in combination with the agentic generator. | ||
|
|
||
| </Warning> | ||
|
|
||
| ### Optional teardown: the `abort` hook | ||
|
|
||
| The module named by `--custom-agent-function-path` may expose an optional `abort` | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returning a
Sampleorlist[Sample].No need to mention "flag is needed or supported natively"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in eae3bdf: the docs now state that GenerateFnOutput.samples accepts a Sample or list[Sample], without tying that contract to a flag or “native support.”