save both old and new file structure for 1x1 - #300
Conversation
WalkthroughThe change standardizes run output directories under timestamped agent/run paths and refactors evaluation reporting to aggregate token-aware totals across offline and agent modes, including legacy flat-output copying and updated 1x1 path assertions. ChangesEvaluation output and reporting
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant run_evaluation
participant RunResult
participant _aggregate_totals
participant _print_run_summary
run_evaluation->>RunResult: collect evaluation summaries
run_evaluation->>_aggregate_totals: aggregate run_results
_aggregate_totals-->>run_evaluation: return totals
run_evaluation->>_print_run_summary: print totals and report locations
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/lightspeed_evaluation/runner/evaluation.py`:
- Around line 88-106: Replace the direct summary/report-location print calls in
the evaluation completion flow with structured logger.info events, including
totals, mode, run count, and output directories as structured fields. Preserve
the existing CLI-formatted output separately only where it is an established
console contract, and retain the current single-run and multi-run directory
behavior.
- Around line 315-319: Add pytest coverage around the evaluation runner flow
containing _aggregate_totals and _copy_flat_output, mocking run_evaluation as
needed. Verify 1x1 runs copy flat output, multi-run executions do not copy it,
and token fields are aggregated correctly; ensure the tests invoke the runner
paths directly rather than relying on the orchestrator test.
In `@tests/unit/pipeline/behavioral/test_orchestrator.py`:
- Around line 404-405: Update the output_dir assertions in the orchestrator test
to normalize or inspect path components using platform-independent path
utilities, rather than matching the hardcoded "model_a/run_1" separator.
Preserve validation that the path contains the model/run layout and the "eval_"
component.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 8e3038bb-cb57-4810-a957-ccc0063c2087
📒 Files selected for processing (3)
src/lightspeed_evaluation/pipeline/behavioral/orchestrator.pysrc/lightspeed_evaluation/runner/evaluation.pytests/unit/pipeline/behavioral/test_orchestrator.py
0b8a929 to
a9c050e
Compare
Description
save both old and new file structure for 1x1
Add additional metadata
Type of change
Tools used to create PR
Identify any AI code assistants used in this PR (for transparency and review context)
Related Tickets & Documents
Checklist before requesting a review
Testing
Summary by CodeRabbit