Commit 484fa090 authored by lintangsutawika's avatar lintangsutawika
Browse files

simplify

parent cf79b1c6
...@@ -6,12 +6,10 @@ import yaml ...@@ -6,12 +6,10 @@ import yaml
import os import os
from lm_eval import evaluator, tasks from lm_eval import evaluator, tasks
from lm_eval.api.task import ConfigurableTask, TASK_REGISTRY from lm_eval.tasks import ALL_TASKS
logging.getLogger("openai").setLevel(logging.WARNING) logging.getLogger("openai").setLevel(logging.WARNING)
os.environ['TOKENIZERS_PARALLELISM'] = 'false' os.environ['TOKENIZERS_PARALLELISM'] = 'false'
ALL_TASKS = sorted(list(TASK_REGISTRY))
class MultiChoice: class MultiChoice:
def __init__(self, choices): def __init__(self, choices):
...@@ -73,8 +71,7 @@ def main(): ...@@ -73,8 +71,7 @@ def main():
if args.config: if args.config:
task_names = [] task_names = []
for config_files in args.config.split(","): for config_files in args.config.split(","):
with open(config_files, "r") as f: config = get_yaml_config(config_files)
config = yaml.load(f, yaml.Loader)
if args.num_fewshot != 0: if args.num_fewshot != 0:
config["num_fewshot"] = args.num_fewshot config["num_fewshot"] = args.num_fewshot
......
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