Test the reference replays apart, a round one of them failed on and a reference that found nothing; drop share's dead guard
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
import dataclasses
|
||||
from fractions import Fraction
|
||||
|
||||
from review_replay.rounds import Round
|
||||
from model_routing.ladder import LADDER, Rung
|
||||
from review_replay.rounds import Round
|
||||
|
||||
# A rung qualifies with a share of the archived findings up to this far below the project's rung's. The project's rung found 69 to 73% of its own findings again, so about 3 of the 30 to 40 that 10 rounds hold go either way between two replays.
|
||||
MARGIN = Fraction(1, 10)
|
||||
@@ -49,8 +49,8 @@ def found_any(reference: Reference) -> bool:
|
||||
|
||||
|
||||
def share(rounds: list[Round], found: list[set[int]]) -> Fraction:
|
||||
total = sum(len(one.findings) for one in rounds)
|
||||
return Fraction(sum(map(len, found)), total) if total else Fraction(0)
|
||||
"""The share of rounds' findings that found holds; rounds is never empty, and each holds a finding."""
|
||||
return Fraction(sum(map(len, found)), sum(len(one.findings) for one in rounds))
|
||||
|
||||
|
||||
def bar(rounds: list[Round], reference: Reference) -> Fraction:
|
||||
|
||||
Reference in New Issue
Block a user