Commit c605a710 authored by lintangsutawika's avatar lintangsutawika
Browse files

add logging information

parent 618c5936
...@@ -6,3 +6,5 @@ logging.basicConfig( ...@@ -6,3 +6,5 @@ logging.basicConfig(
level=logging.INFO, level=logging.INFO,
) )
eval_logger = logging.getLogger("lm-eval") eval_logger = logging.getLogger("lm-eval")
SPACING = " "*47
\ No newline at end of file
...@@ -9,7 +9,7 @@ from pathlib import Path ...@@ -9,7 +9,7 @@ from pathlib import Path
from lm_eval import evaluator, utils from lm_eval import evaluator, utils
from lm_eval.api.registry import ALL_TASKS from lm_eval.api.registry import ALL_TASKS
from lm_eval.logger import eval_logger from lm_eval.logger import eval_logger, SPACING
from lm_eval.tasks import include_task_folder from lm_eval.tasks import include_task_folder
os.environ["TOKENIZERS_PARALLELISM"] = "false" os.environ["TOKENIZERS_PARALLELISM"] = "false"
...@@ -132,6 +132,12 @@ def main(): ...@@ -132,6 +132,12 @@ def main():
config = utils.load_yaml_config(task) config = utils.load_yaml_config(task)
task_names.append(config) task_names.append(config)
if task_names == []:
eval_logger.error(
"No tasks were detected,\n"
f"{SPACING}Try `lm-eval -h` for list of available tasks",
)
if args.output_path: if args.output_path:
path = Path(args.output_path) path = Path(args.output_path)
# check if file or 'dir/results.json' exists # check if file or 'dir/results.json' exists
......
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