Skip to content

Comments

Outputs builder#792

Merged
mikasenghaas merged 6 commits intooverhaul-results-savingfrom
outputs-builder
Jan 28, 2026
Merged

Outputs builder#792
mikasenghaas merged 6 commits intooverhaul-results-savingfrom
outputs-builder

Conversation

@willccbb
Copy link
Member

@willccbb willccbb commented Jan 28, 2026

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Test improvement

Testing

  • All existing tests pass when running uv run pytest locally.
  • New tests have been added to cover the changes

Checklist

  • My code follows the style guidelines of this project as outlined in AGENTS.md
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Additional Notes


Note

Shifts generation outputs from raw State objects to serialized RolloutOutput dicts and introduces an incremental results builder for efficient saving and display.

  • Add RolloutOutput type and update GenerateOutputs to use outputs (replacing states); update docs and all call sites/tests accordingly
  • Introduce GenerateOutputsBuilder to serialize once, stream progress, compute metadata, and support intermediate saves; final results sorted by example_id
  • Add state_to_output/states_to_outputs, remove sanitize_states; validate state_columns are JSON-serializable; errors serialized as strings
  • Update Environment.generate() to build outputs incrementally and adjust progress callbacks to use RolloutOutput
  • Modify utils (eval_utils, eval_display, logging_utils, save_utils) to consume serialized outputs; make_dataset now builds directly from outputs
  • Adapt integrations (gepa.adapter, RL trainer orchestrator) to the new outputs schema
  • Update Gym/eval/CLI tests and fixtures to the new API

Written by Cursor Bugbot for commit a17a1d1. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@willccbb willccbb requested a review from mikasenghaas January 28, 2026 03:01
Copy link
Member

@mikasenghaas mikasenghaas left a comment

Choose a reason for hiding this comment

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

lfgtm!

### RolloutOutput

```python
class RolloutOutput(dict):
Copy link
Member

Choose a reason for hiding this comment

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

ah yea funnily enough i had a type very similar to this one initially but then scratched it bc it felt too redundant. basiclly RolloutOutput = State - untyped columns + state columns and so I wasn't sure this justified an entirely new type (that now also has to be synced)

@mikasenghaas mikasenghaas merged commit a822276 into overhaul-results-saving Jan 28, 2026
3 checks 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