Refactor/consolidate eval pipelines#33
Open
kargibora wants to merge 4 commits intorefactor/unify-cli-config-dedup-truncatefrom
Open
Refactor/consolidate eval pipelines#33kargibora wants to merge 4 commits intorefactor/unify-cli-config-dedup-truncatefrom
kargibora wants to merge 4 commits intorefactor/unify-cli-config-dedup-truncatefrom
Conversation
…/consolidate-eval-pipelines
…/consolidate-eval-pipelines
| class EvaluationResult: | ||
| """Pure-data container for an evaluation run's outputs. | ||
|
|
||
| Holds the computed summary, preferences, annotation DataFrame, and the |
Collaborator
There was a problem hiding this comment.
nit: this explanation might be redundant
ErlisLushtaku
approved these changes
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Consolidate evaluation pipelines
Summary
Both
evaluate.py(evaluate_completions) andgenerate_and_evaluate.py(main)independently build annotation DataFrames, compute preference summaries, serialize
results to JSON/CSV, and write run metadata — with slightly different code each time.
This PR extracts that shared logic into reusable helpers so both pipelines go through
the same path.
Depends on: #31
What changed
EvaluationResultdataclassannotations_df,prefs,summary, andrun_config. No I/O.build_annotation_dataframe()build_evaluation_result()EvaluationResult. Pure logic — no disk access.save_evaluation_result()EvaluationResultto disk (CSV + JSON + run metadata). Single place for all serialization.Files touched (relative to PR 1)
judgearena/evaluate.py— Added the four helpers above; refactoredevaluate_completionsto use them (+220 / −6)judgearena/generate_and_evaluate.py— Replaced ~60 lines of inline DataFrame building, summary computation, JSON writing, and metadata writing with calls to the new helpers (+39 / −55)Before → After
Before: each pipeline had its own copy of: