-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle exceptions when invoking LLM App and retrieving JSON from URI #1320
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, @mmabrouk! I left a comment.
for _ in testset_data: | ||
list_of_app_outputs.append( | ||
InvokationResult( | ||
result=Result( | ||
type="error", | ||
error=Error( | ||
message="An error occurred while invoking the LLM App", | ||
stacktrace=str(e), | ||
), | ||
) | ||
) | ||
) | ||
return list_of_app_outputs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens in the case where a user has 50 data in their testset, evaluation runs for the first 10, and the eleventh fails?
Are we marking the status of that evaluation as partial fail
? Or, failed
?
If it's the former, I'd recommend we minus the length of list_of_app_outputs
from the testset_data
and only record the failed datapoint to the last. If it's the latter (marking the entire evaluation as failed), then we should clear the list_of_app_outputs
so we don't end up having duplicate datapoint results.
See suggestion:
len_of_app_outputs = len(list_of_app_outputs)
for _ in testset_data[len_of_app_outputs:]:
# continue logic
resp = await client.get(uri, timeout=timeout) | ||
json_data = json.loads(resp.text) | ||
return json_data | ||
except Exception as e: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this won't be populated to the user.
except Exception as e: | ||
logger.traceback.print_exc() | ||
for _ in testset_data: | ||
list_of_app_outputs.append( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this loop
No description provided.