Args is being accessed incorrectly

#2
by derek-thomas HF staff - opened
src/backend/run_eval_suite_lighteval.py CHANGED
@@ -45,7 +45,7 @@ def run_evaluation(eval_request: EvalRequest, task_names: str, batch_size: int,
45
  dumped = json.dumps(results, indent=2)
46
  print(dumped)
47
  except Exception: # if eval failed, we force a cleanup
48
- env_config = EnvConfig(token=TOKEN, cache_dir=args.cache_dir)
49
 
50
  model_config = create_model_config(args=args, accelerator=accelerator)
51
  model, _ = load_model(config=model_config, env_config=env_config)
 
45
  dumped = json.dumps(results, indent=2)
46
  print(dumped)
47
  except Exception: # if eval failed, we force a cleanup
48
+ env_config = EnvConfig(token=TOKEN, cache_dir=args['cache_dir'])
49
 
50
  model_config = create_model_config(args=args, accelerator=accelerator)
51
  model, _ = load_model(config=model_config, env_config=env_config)