Skip to content

Commit 74f0463

Browse files
committed
ref: skip parse func failure
1 parent b06cace commit 74f0463

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

‎src/bespokelabs/curator/request_processor/online/base_online_request_processor.py‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -570,12 +570,6 @@ async def append_generic_response(self, status_tracker: OnlineStatusTracker, dat
570570
data: Response data to append
571571
filename: File to append to
572572
"""
573-
error_help = (
574-
"Please check your `parse_func` is returning a valid row (dict) "
575-
"or list of rows (list of dicts) and re-run. "
576-
"Dataset will be regenerated from cached LLM responses."
577-
)
578-
579573
try:
580574
data.response_message = self.prompt_formatter.response_to_response_format(data.response_message)
581575
except (json.JSONDecodeError, ValidationError):
@@ -590,9 +584,9 @@ async def append_generic_response(self, status_tracker: OnlineStatusTracker, dat
590584
data.response_message,
591585
)
592586
except Exception as e:
593-
logger.error(f"Exception raised in your `parse_func`. {error_help}")
594-
# TODO: check if raise
595-
raise e
587+
logger.warning(f"Skipping response due to error in `parse_func` :: {e}")
588+
return
589+
596590
if not isinstance(responses, list):
597591
responses = [responses]
598592
else:

0 commit comments

Comments
 (0)