Commit ff148cd8 authored by haileyschoelkopf's avatar haileyschoelkopf
Browse files

don't call evaluate.load() every time

parent 8d4d1fa9
...@@ -136,14 +136,17 @@ def acc_mutual_info_fn(items): # This is a passthrough function ...@@ -136,14 +136,17 @@ def acc_mutual_info_fn(items): # This is a passthrough function
return items return items
exact_match = evaluate.load("exact_match")
@register_metric( @register_metric(
metric="exact_match", metric="exact_match",
higher_is_better=True, higher_is_better=True,
output_type="generate_until", output_type="generate_until",
aggregation="mean", aggregation="mean",
) )
def exact_match_fn(**kwargs): # This is a passthrough function def exact_match_fn(**kwargs):
return evaluate.load("exact_match").compute(**kwargs) return exact_match.compute(**kwargs)
@register_metric( @register_metric(
......
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