Skip to content

Commit f5fb0d0

Browse files
committed
Improve error handling in evaluation.py - add RuntimeError propagation and better logging
1 parent d1f9631 commit f5fb0d0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/evaluation.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,12 @@ def evaluation_function(response: Any, answer: Any, params: Params) -> Result:
172172
feedback = feedback_prefix + feedback
173173
return Result(feedback=feedback, is_correct=False)
174174

175+
except RuntimeError:
176+
# Initialization errors - let them propagate to the platform
177+
raise
175178
except Exception as e:
179+
# Unexpected errors during evaluation - return as feedback
180+
logger.exception(f"Unexpected error during evaluation: {e}")
176181
return Result(feedback=f"Unexpected error during evaluation: {e}", is_correct=False)
177182

178183

0 commit comments

Comments
 (0)