"vscode:/vscode.git/clone" did not exist on "13452c07fe403b915ae99003e82fcf7c9fc221a6"
Commit e2bfdf3b authored by lintangsutawika's avatar lintangsutawika
Browse files

add weight_by_size config

parent 45a8f709
......@@ -80,6 +80,7 @@ class TaskConfig(dict):
filter_list: Union[str, list] = None
should_decontaminate: bool = False
doc_to_decontamination_query: str = None
weight_by_size: bool = False
metadata: Union[
str, list
......
......@@ -123,7 +123,7 @@ def simple_evaluate(
for task_name in task_dict.keys():
task_obj = task_dict[task_name]
if type(task_obj) == tuple:
group, task_obj = task_obj
_, task_obj = task_obj
if task_obj is None:
continue
......@@ -484,12 +484,11 @@ def evaluate(
if "alias" in metrics:
metrics.pop("alias")
if configs[task]["weight_by_size"]:
current_size = metrics.pop("samples")
# TODO: There should be a way for users
# to toggle between weighted and
# unweighted averaging
# For unweighted averaging, use:
# current_size = 1
else:
metrics.pop("samples")
current_size = 1
all_stderr = []
for metric in [
......
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