Skip to content

repo compare: baseline_mean and treatment_mean are None for finite scores whose plain sum overflows #866

Open

Description

@antonwolfy

sign_flip_summary (dokimi/dokimi/repos/compare.py) computes baseline_mean and treatment_mean with _mean, a plain sum(nums) / len(nums), and _round turns a non-finite result into None. Repro: sign_flip_summary([{"task": f"t{i}", "baseline": 1.7e308, "treatment": 1.7e308, "delta": 0.0} for i in range(3)], "metric:x") returns baseline_mean None and treatment_mean None although both means are 1.7e308 (the deltas are 0, so the checked_mean refusal of the deltas does not apply). Fix: average with statistics.mean when the plain sum is not finite and every value is, as eval/arm_summary.mean_in_range and eval/stats._mean do.

Found while fixing #832. The fix's PR is #867.

Activity

  1. self-assigned this
    on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions