ImmunoGraph-Bench's picture
Add anonymized benchmark QA and minimal evaluation demos
ad506db verified
|
Raw History Blame Contribute Delete
1.41 kB

Offline evaluation demo

Python 3 standard library only. No model calls, credentials or network access.

evaluate_predictions.py compares predictions with the released QA answers. It supports JSONL or gzipped JSONL QA files and an optional explicit aliases mapping. Its simple string normalization is not the paper's complete alias judge. See the root README for invocation and limitations.

score_frozen.py aggregates an explicitly selected, existing boolean correctness field. It does not generate predictions or infer aliases. Supply one model per file.

python code/score_frozen.py --answers predictions.jsonl --correct-field correct_alias --error-policy exclude --out scores.json

Each input record must contain qa_id, condition (or setting) and the selected boolean correctness field. Optional fields are subtype, error and api_error. Duplicate QA/condition pairs are rejected. Missing judgments are unscored, not automatically incorrect. The output reports scored denominators explicitly.

Error policy must be chosen explicitly:

  • exclude: exclude explicitly flagged API failures.
  • count_as_incorrect: count explicitly flagged API failures as incorrect.
  • stored: use the stored judgment without overriding it.

This small demo is not a replacement for the benchmark's full answer-parsing and alias-judging pipeline and makes no claim of reproducing missing model runs.