Fix UnboundLocalError: local variable 'results' referenced before assignment

#16
by albertvillanova HF staff - opened
src/backend/run_eval_suite_lighteval.py CHANGED
@@ -101,5 +101,6 @@ def run_evaluation(
101
 
102
  except Exception: # if eval failed, we force a cleanup
103
  pipeline.model.cleanup()
 
104
 
105
  return results
 
101
 
102
  except Exception: # if eval failed, we force a cleanup
103
  pipeline.model.cleanup()
104
+ raise
105
 
106
  return results