derek-thomas HF staff commited on
Commit
8bd884a
1 Parent(s): b2a9c22

Adding better exception handling

Browse files
src/backend/run_eval_suite_lighteval.py CHANGED
@@ -61,7 +61,7 @@ def run_evaluation(eval_request: EvalRequest, task_names: str, batch_size: int,
61
 
62
  dumped = json.dumps(results, indent=2)
63
  logger.info(dumped)
64
- except Exception: # if eval failed, we force a cleanup
65
  env_config = EnvConfig(token=TOKEN, cache_dir=args.cache_dir)
66
 
67
  model_config = create_model_config(args=args, accelerator=accelerator)
 
61
 
62
  dumped = json.dumps(results, indent=2)
63
  logger.info(dumped)
64
+ except Exception as e: # if eval failed, we force a cleanup
65
  env_config = EnvConfig(token=TOKEN, cache_dir=args.cache_dir)
66
 
67
  model_config = create_model_config(args=args, accelerator=accelerator)