Skip to content

Commit

Permalink
Bit of Alistair hackery, needs checking
Browse files Browse the repository at this point in the history
  • Loading branch information
ammoffat committed Dec 16, 2024
1 parent 029a6f5 commit 19d3552
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions rbstar/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,19 +132,19 @@ def output_results(results: Dict[str, Tuple[MetricResult, Dict]], metric: str, p
else:
if args.perquery: # we'll do plaintext per-query output
for run_name, (_, rdict) in results.items():
print(f"\n=== Per-Query Metric Results for {run_name} ===")
print(f"qid\tlower\tupper\tresidual")
print(f"\n=== Per-Query XXX Results for {run_name} ===")
print(f"qid\tscore\tresid\tupper")
for qid, result in rdict.items():
lb = result["lower_bound"]
ub = result["upper_bound"]
res = result["residual"]
print(f"{qid}\t{lb:.4f}\t{ub:.4f}\t{res:.4f}")
ub = result["upper_bound"]
print(f"{qid}\t{lb:.4f}\t{res:.4f}\t{ub:.4f}")

for run_name, (result, per_query) in results.items():
print(f"\n=== Final Metric Results for {run_name} ({len(per_query)} obs/refs) ===")
print(f'Mean score : {result.lower_bound:>8.4f}')
print(f'Mean residual : {result.residual:>8.4f}')
print(f'Mean max score: {result.upper_bound:>8.4f}')
print(f"\n=== Final XXX Results for {run_name} ({len(per_query)} obs/refs) ===")
print(f'Mean score : {result.lower_bound:>8.4f}')
print(f'Mean residual : {result.residual:>8.4f}')
print(f'Mean upper score : {result.upper_bound:>8.4f}')

def rbstar_main():
"""
Expand Down

0 comments on commit 19d3552

Please sign in to comment.