Skip to content

[codex] Preserve fractional rollout hard scores#104

Merged
Yif-Yang merged 1 commit into
microsoft:mainfrom
zixuanguo786-ctrl:codex/preserve-fractional-hard-score
Jul 14, 2026
Merged

[codex] Preserve fractional rollout hard scores#104
Yif-Yang merged 1 commit into
microsoft:mainfrom
zixuanguo786-ctrl:codex/preserve-fractional-hard-score

Conversation

@zixuanguo786-ctrl

Copy link
Copy Markdown
Contributor

Summary

  • Store RolloutResult.hard as a float instead of truncating through int().
  • Preserve continuous hard rewards such as 0.75 through from_dict() and to_dict().
  • Add a regression test covering fractional hard score round-tripping.

Test plan

  • uv run --with pytest pytest tests/test_types.py tests/test_scoring.py -q
  • uv run --with ruff ruff check skillopt/types.py tests/test_types.py

Rollout hard scores can be continuous when smoothed rewards are used. Converting the field through int() turned values like 0.75 into 0, which loses signal before scoring and serialization.

Constraint: Keep the existing RolloutResult dictionary shape unchanged.

Rejected: Clamp hard scores to 0 or 1 | contradicts existing continuous-score support in compute_score and sleep replay types.

Confidence: high

Scope-risk: narrow

Reversibility: clean

Directive: Treat hard as numeric reward data, not only a binary label.

Tested: uv run --with pytest pytest tests/test_types.py tests/test_scoring.py -q

Tested: uv run --with ruff ruff check skillopt/types.py tests/test_types.py

Not-tested: Full benchmark rollouts.
@Yif-Yang

Copy link
Copy Markdown
Contributor

Hi @zixuanguo786-ctrl — preserving fractional hard scores looks correct and I verified the truncation fix locally (0.75 no longer becomes 0), tests pass. Still in draft — ready to merge?

@zixuanguo786-ctrl

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

@zixuanguo786-ctrl
zixuanguo786-ctrl marked this pull request as ready for review July 14, 2026 01:36
@Yif-Yang
Yif-Yang merged commit c2992b9 into microsoft:main Jul 14, 2026
1 check passed
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