Skip to content

Log compaction-aware rollout metrics - #2710

Open
Shi-Dong wants to merge 1 commit into
mainfrom
shi/260821-rollout-step-metrics
Open

Log compaction-aware rollout metrics#2710
Shi-Dong wants to merge 1 commit into
mainfrom
shi/260821-rollout-step-metrics

Conversation

@Shi-Dong

@Shi-Dong Shi-Dong commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • log rollout/num_training_samples for the finalized samples in each rollout step
  • log rollout/episode_raw_reward by averaging samples within each original rollout, then averaging rollouts equally

Why

Session compaction can turn one rollout into many training samples. The existing raw-reward metric gives those rollouts proportionally more weight, and W&B does not currently expose how many samples a step trains on. These metrics make both effects visible without changing the meaning of existing metric histories.

Testing

  • python -m pytest --confcutdir=tests/fast/ray/rollout tests/fast/ray/rollout/test_metrics.py -q (23 passed)
  • uvx black --check miles/ray/rollout/metrics.py tests/fast/ray/rollout/test_metrics.py
  • python -m ruff check miles/ray/rollout/metrics.py tests/fast/ray/rollout/test_metrics.py
  • git diff --check

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@Shi-Dong
Shi-Dong force-pushed the shi/260821-rollout-step-metrics branch from 519fdd9 to 3912a50 Compare August 22, 2026 05:58
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.

2 participants