Unverified Commit 23dcc12e authored by Stella Biderman's avatar Stella Biderman Committed by GitHub
Browse files

Merge pull request #575 from poedator/patch-1

Update evaluator.py cache_db argument str if model is not str
parents b21c8f3d 811252b8
...@@ -77,7 +77,7 @@ def simple_evaluate( ...@@ -77,7 +77,7 @@ def simple_evaluate(
lm = lm_eval.base.CachingLM( lm = lm_eval.base.CachingLM(
lm, lm,
"lm_cache/" "lm_cache/"
+ model + (model if isinstance(model, str) else model.model.config._name_or_path)
+ "_" + "_"
+ model_args.replace("=", "-").replace(",", "_").replace("/", "-") + model_args.replace("=", "-").replace(",", "_").replace("/", "-")
+ ".db", + ".db",
...@@ -102,7 +102,7 @@ def simple_evaluate( ...@@ -102,7 +102,7 @@ def simple_evaluate(
# add info about the model and few shot config # add info about the model and few shot config
results["config"] = { results["config"] = {
"model": model, "model": (model if isinstance(model, str) else model.model.config._name_or_path),
"model_args": model_args, "model_args": model_args,
"num_fewshot": num_fewshot, "num_fewshot": num_fewshot,
"batch_size": batch_size, "batch_size": batch_size,
......
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