Skip to content

Commit

Permalink
fix the raise of error in eval.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 617585033
  • Loading branch information
yifenglou authored and langfun authors committed Mar 21, 2024
1 parent 4a6e3bb commit 0e623c7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion langfun/core/eval/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,10 @@ def _process(example: Any):
status_fn=self._status,
):
if error is not None:
self._failures.append((example, str(error)))
try:
self._failures.append((example, str(error)))
except Exception as e: # pylint: disable=broad-exception-caught
print(e)
else:
output = message.text if self.schema is None else message.result
self.audit(example, output, message)
Expand Down

0 comments on commit 0e623c7

Please sign in to comment.