Skip to content

Commit 4b8a092

Browse files
author
desulaiy
committed
The code changes in eleuther_eval.py refactor the EleutherEvalRecipe class to improve the initialization of the task manager. Instead of using an if-else statement to check for the presence of the include_path configuration, the code now directly passes the value of self._cfg.get("include_path", None) to the TaskManager constructor.
1 parent bca0c29 commit 4b8a092

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

recipes/eleuther_eval.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -241,11 +241,8 @@ def evaluate(self) -> None:
241241
except Exception:
242242
pass
243243

244-
if self._cfg.get("include_path", False):
245-
task_manager = TaskManager(include_path=self._cfg.include_path)
246-
task_dict = get_task_dict(self._tasks, task_manager)
247-
else:
248-
task_dict = get_task_dict(self._tasks)
244+
task_manager = TaskManager(include_path=self._cfg.get("include_path", None))
245+
task_dict = get_task_dict(self._tasks, task_manager)
249246

250247
logger.info(f"Running evaluation on {self._tasks} tasks.")
251248
output = evaluate(

0 commit comments

Comments
 (0)