diffsum: fix upsteam_unstable count w/ diffrepro

parent 76275531
......@@ -75,7 +75,7 @@ def main():
report = DiffReport.from_json(datafile)
report.summary = Summary.from_report(
report, field_weights,
reproducibility_threshold=(0 if args.without_diffrepro else 1))
without_diffrepro=args.without_diffrepro)
cli.print_global_stats(report)
cli.print_differences_stats(report)
......
......@@ -281,7 +281,8 @@ class Summary(Disagreements):
def from_report(
report: 'DiffReport',
field_weights: Sequence[FieldLabel],
reproducibility_threshold: float = 1
reproducibility_threshold: float = 1,
without_diffrepro: bool = False
) -> 'Summary':
"""Get summary of disagreements above the specified reproduciblity threshold (0, 1]."""
if (report.other_disagreements is None
......@@ -293,7 +294,7 @@ class Summary(Disagreements):
summary.upstream_unstable = len(report.other_disagreements)
for qid, diff in report.target_disagreements.items():
if report.reprodata is not None:
if not without_diffrepro and report.reprodata is not None:
reprocounter = report.reprodata[qid]
if reprocounter.retries > 0:
if reprocounter.retries != reprocounter.upstream_stable:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment