Commit 641ffeba authored by lintangsutawika's avatar lintangsutawika
Browse files

changed source of ALL_TASKS

parent d5071b70
...@@ -10,8 +10,7 @@ from typing import Union ...@@ -10,8 +10,7 @@ from typing import Union
import numpy as np import numpy as np
from lm_eval import evaluator, utils from lm_eval import evaluator, utils
from lm_eval.api.registry import ALL_TASKS from lm_eval.tasks import initialize_tasks
from lm_eval.tasks import include_path, initialize_tasks
from lm_eval.utils import make_table from lm_eval.utils import make_table
...@@ -156,24 +155,23 @@ def cli_evaluate(args: Union[argparse.Namespace, None] = None) -> None: ...@@ -156,24 +155,23 @@ def cli_evaluate(args: Union[argparse.Namespace, None] = None) -> None:
eval_logger.info(f"Verbosity set to {args.verbosity}") eval_logger.info(f"Verbosity set to {args.verbosity}")
os.environ["TOKENIZERS_PARALLELISM"] = "false" os.environ["TOKENIZERS_PARALLELISM"] = "false"
initialize_tasks(args.verbosity) # initialize_tasks(args.verbosity)
ALL_TASKS = initialize_tasks(args.verbosity, include_path=args.include_path)
if args.limit: if args.limit:
eval_logger.warning( eval_logger.warning(
" --limit SHOULD ONLY BE USED FOR TESTING." " --limit SHOULD ONLY BE USED FOR TESTING."
"REAL METRICS SHOULD NOT BE COMPUTED USING LIMIT." "REAL METRICS SHOULD NOT BE COMPUTED USING LIMIT."
) )
if args.include_path is not None:
eval_logger.info(f"Including path: {args.include_path}")
include_path(args.include_path)
if args.tasks is None: if args.tasks is None:
task_names = ALL_TASKS eval_logger.error(
"Need to specify task to evaluate."
)
elif args.tasks == "list": elif args.tasks == "list":
eval_logger.info( eval_logger.info(
"Available Tasks:\n - {}".format("\n - ".join(sorted(ALL_TASKS))) "Available Tasks:\n - {}".format("\n - ".join(sorted(ALL_TASKS)))
) )
sys.exit()
else: else:
if os.path.isdir(args.tasks): if os.path.isdir(args.tasks):
import glob import glob
......
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