support log rollout info#1579
Conversation
|
@claude review |
|
Claude: ## Summary IssuesWarning
Nit
VerdictCOMMENT — no blocking issues, but the |
|
@claude review and check the definition of ProduceBatchResult and ProducerTimings is clear enough for users. |
|
Claude: ## Summary Regarding the specific question about whether
IssuesWarning
Nit
VerdictCOMMENT — no blocking issues. Adding docstrings to the two new dataclasses would make the API self-documenting. |
|
@claude review, if you think this pr is ok, give this pr an approve |
| @dataclass | ||
| class ProduceBatchResult: | ||
| """Result of a single ``produce_batch`` call. | ||
|
|
||
| Attributes: | ||
| rollout_states (list[list[RolloutState]]): Completed rollout groups retrieved from the replay buffer for training. | ||
| group_gen_count (int | None): Number of generate-group calls finished in this batch (None if no generations ran). | ||
| group_gen_mean_s (float | None): Mean wall-clock time per generate-group call, in seconds. | ||
| group_gen_p50_s (float | None): Median (p50) generate-group time, in seconds. | ||
| group_gen_p99_s (float | None): 99th percentile generate-group time, in seconds. | ||
| group_gen_p99_p50_ratio (float | None): Ratio of p99 to p50, indicating tail-latency skew. | ||
| group_gen_pause_time_s (float | None): Time spent in pause/cleanup phase (async strategy only), in seconds. | ||
| leftover_completed (int): Number of completed groups remaining in the replay buffer after this batch. | ||
| leftover_aborted (int): Number of aborted groups remaining in the replay buffer. |
There was a problem hiding this comment.
Claude: Per CLAUDE.md: "Do not declare Attributes in the class docstring." For dataclasses, the fields are __init__ parameters, so Google style uses Args: instead. The previous review already suggested this format — please switch Attributes: → Args:.
| @dataclass | |
| class ProduceBatchResult: | |
| """Result of a single ``produce_batch`` call. | |
| Attributes: | |
| rollout_states (list[list[RolloutState]]): Completed rollout groups retrieved from the replay buffer for training. | |
| group_gen_count (int | None): Number of generate-group calls finished in this batch (None if no generations ran). | |
| group_gen_mean_s (float | None): Mean wall-clock time per generate-group call, in seconds. | |
| group_gen_p50_s (float | None): Median (p50) generate-group time, in seconds. | |
| group_gen_p99_s (float | None): 99th percentile generate-group time, in seconds. | |
| group_gen_p99_p50_ratio (float | None): Ratio of p99 to p50, indicating tail-latency skew. | |
| group_gen_pause_time_s (float | None): Time spent in pause/cleanup phase (async strategy only), in seconds. | |
| leftover_completed (int): Number of completed groups remaining in the replay buffer after this batch. | |
| leftover_aborted (int): Number of aborted groups remaining in the replay buffer. | |
| """Result of a single ``produce_batch`` call. | |
| Args: | |
| rollout_states (list[list[RolloutState]]): Completed rollout groups retrieved from the replay buffer for training. | |
| group_gen_count (int | None): Number of generate-group calls finished in this batch (None if no generations ran). | |
| group_gen_mean_s (float | None): Mean wall-clock time per generate-group call, in seconds. | |
| group_gen_p50_s (float | None): Median (p50) generate-group time, in seconds. | |
| group_gen_p99_s (float | None): 99th percentile generate-group time, in seconds. | |
| group_gen_p99_p50_ratio (float | None): Ratio of p99 to p50, indicating tail-latency skew. | |
| group_gen_pause_time_s (float | None): Time spent in pause/cleanup phase (async strategy only), in seconds. | |
| leftover_completed (int): Number of completed groups remaining in the replay buffer after this batch. | |
| leftover_aborted (int): Number of aborted groups remaining in the replay buffer. | |
| leftover_expired (int): Number of expired groups remaining in the replay buffer. | |
| """ |
| """Handle preprocessing and postprocessing for partial rollout | ||
| continuation.""" |
There was a problem hiding this comment.
Claude: Nit: This docstring rewrap appears unrelated to the rollout logging feature. The original single-line docstring was fine. Consider reverting to keep the diff minimal per PR standards ("Keep the diff minimal — fix only the bug. Do not refactor surrounding code").
| """Handle preprocessing and postprocessing for partial rollout | |
| continuation.""" | |
| """Handle preprocessing and postprocessing for partial rollout continuation.""" |
|
Claude: ## Summary IssuesNit
VerdictAPPROVE — the remaining items are all nits. The core logic is correct and the API is well-designed. Nice work iterating on the review feedback. |
* support log rollout info * fix claude comments * replace timing_n to group_gen_count and completed_samples to leftover_completed * add docstring for ProducerTimings and ProduceBatchResult * replace to Attributes to Args
No description provided.