Skip to content

Commit

Permalink
other metric test
Browse files Browse the repository at this point in the history
  • Loading branch information
kampersanda committed Oct 26, 2024
1 parent f5e19aa commit 95eecc7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/compare_with_trec_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ def compare_decimal_places(a: str, b: str, decimal_places: int) -> bool:
[metric for _, metric in metric_pairs],
)

# Add some additional basic metrics
metric_pairs.extend(
[
("num_q", "n_queries_in_true"),
("num_q", "n_queries_in_pred"),
("num_ret", "n_docs_in_pred"),
("num_rel", "n_true_relevant_docs"),
]
)

failed_rows: list[str] = []
for trec_metric, elinor_metric in metric_pairs:
trec_score = trec_results["trec_eval_output"][trec_metric]
Expand Down

0 comments on commit 95eecc7

Please sign in to comment.