"vscode:/vscode.git/clone" did not exist on "405591c3f191744469e02e4ce8d4fb1250d68721"
Commit 6f42ab7c authored by lintangsutawika's avatar lintangsutawika
Browse files

detect if a task was not found

parent ee59182d
...@@ -127,15 +127,18 @@ def main(): ...@@ -127,15 +127,18 @@ def main():
else: else:
tasks_list = args.tasks.split(",") tasks_list = args.tasks.split(",")
task_names = utils.pattern_match(tasks_list, ALL_TASKS) task_names = utils.pattern_match(tasks_list, ALL_TASKS)
task_missing = []
for task in [task for task in tasks_list if task not in task_names]: for task in [task for task in tasks_list if task not in task_names]:
if os.path.isfile(task): if os.path.isfile(task):
config = utils.load_yaml_config(task) config = utils.load_yaml_config(task)
task_names.append(config) task_names.append(config)
else:
task_missing.append(task)
if task_names == []: if task_missing != []:
eval_logger.error( eval_logger.error(
"No tasks were detected,\n" "Tasks were not found: {}\n"
f"{SPACING}Try `lm-eval -h` for list of available tasks", "{}Try `lm-eval -h` for list of available tasks".format(", ".join(task_missing), SPACING)
) )
if args.output_path: if args.output_path:
......
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