Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanHB committed Jan 30, 2024
1 parent b7b7068 commit 41f5e8b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lighteval/logging/evaluation_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,8 @@ def push_results_to_tensorboard( # noqa: C901
else:
tb_context.add_scalar(f"{prefix}/{task_name}/{metric}", value, global_step=global_step)
# e.g. MMLU
for name, averages in bench_averages.items():
for metric, values in averages.items():
for name, values in bench_averages.items():
for metric, values in values.items():
hlog(f"Pushing average {name} {metric} {sum(values) / len(values)} to tensorboard")
tb_context.add_scalar(f"{prefix}/{name}/{metric}", sum(values) / len(values), global_step=global_step)

Expand Down
2 changes: 2 additions & 0 deletions src/lighteval/tasks/lighteval_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ def create_requests_from_tasks( # noqa: C901
lm: BaseModel,
max_samples: int,
evaluation_tracker: "EvaluationTracker",
use_chat_template: bool,
) -> Tuple[dict[RequestType, list[Request]], dict[TaskExampleId, Doc]]:
"""
Takes a task dict and a fewshot dict and returns a dict of requests, a dict of docs, and a dict of requests origins.
Expand Down Expand Up @@ -428,6 +429,7 @@ def create_requests_from_tasks( # noqa: C901
max_model_length=lm.max_length,
sampler=rnd,
tokenizer=lm.tokenizer,
use_chat_template=use_chat_template,
)
doc.num_effective_few_shots = num_effective_few_shots
doc.num_asked_few_shots = num_fewshot
Expand Down

0 comments on commit 41f5e8b

Please sign in to comment.