Skip to content

Commit a19db46

Browse files
committed
raise model handler error in evaluate
1 parent f5dba40 commit a19db46

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

app/services/evaluator_service.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,11 @@ def evaluate_results(self, request: EvaluationRequest, job_name=None,is_demo: bo
381381
"output_path": output_path
382382
}
383383
except APIError:
384-
raise
384+
raise
385+
except ModelHandlerError as e:
386+
# Add this specific handler
387+
self.logger.error(f"ModelHandlerError in evaluation: {str(e)}")
388+
raise APIError(str(e))
385389
except Exception as e:
386390
error_msg = f"Error in evaluation process: {str(e)}"
387391
self.logger.error(error_msg, exc_info=True)
@@ -665,6 +669,10 @@ def evaluate_row_data(self, request: EvaluationRequest, job_name=None, is_demo:
665669
}
666670
except APIError:
667671
raise
672+
except ModelHandlerError as e:
673+
# Add this specific handler
674+
self.logger.error(f"ModelHandlerError in evaluation: {str(e)}")
675+
raise APIError(str(e))
668676
except Exception as e:
669677
error_msg = f"Error in row evaluation process: {str(e)}"
670678
self.logger.error(error_msg, exc_info=True)

0 commit comments

Comments
 (0)