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