Unverified Commit b9a6a3df authored by Poedator's avatar Poedator Committed by GitHub
Browse files

Update evaluator.py cache_db argument str

in case `isinstance(model, lm_eval.base.LM)` line 80 gives error, because `model` is not `str`. A simple inline if statement fixes this.
parent b21c8f3d
...@@ -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.config._name_or_path)
+ "_" + "_"
+ model_args.replace("=", "-").replace(",", "_").replace("/", "-") + model_args.replace("=", "-").replace(",", "_").replace("/", "-")
+ ".db", + ".db",
......
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