Commit 671ce18a authored by lintangsutawika's avatar lintangsutawika
Browse files

fix weight by size potential error

parent 9492b6e7
...@@ -197,7 +197,6 @@ def evaluate( ...@@ -197,7 +197,6 @@ def evaluate(
decontamination_ngrams_path=None, decontamination_ngrams_path=None,
write_out: bool = False, write_out: bool = False,
log_samples: bool = True, log_samples: bool = True,
weight_by_size: bool = False,
): ):
"""Instantiate and evaluate a model on a list of tasks. """Instantiate and evaluate a model on a list of tasks.
...@@ -485,7 +484,7 @@ def evaluate( ...@@ -485,7 +484,7 @@ def evaluate(
if "alias" in metrics: if "alias" in metrics:
metrics.pop("alias") metrics.pop("alias")
if configs[task]["weight_by_size"]: if ("weight_by_size" in configs) and configs[task]["weight_by_size"]:
current_size = metrics.pop("samples") current_size = metrics.pop("samples")
else: else:
metrics.pop("samples") metrics.pop("samples")
......
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