-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[BFCL] Resolve Issue in Gemini Model When No Model Output #809
Conversation
Hey @gabrielibagon, could you kindly verify if this is the best way to patch it? |
This looks good to me. I'm curious on what situations Gemini returns no candidates vs no parts, since I've not often encountered no candidates being returned. But this seems like the right approach for that situation. |
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.
LGTM. In PR description, attach an error test case and error output. This can help Gemini folks locate the model/serving issue.
The previous implementation of checking |
…il#809) When the Gemini models output no content, the `api_response.candidates` will be `[]`, and so calling `api_response.candidates[0].content.parts` will give `IndexError: list index out of range`. We should check if there is a candidate before accessing its content.
This PR updates the leaderboard to reflect the change in score due to the following PR merge: 1. #747 2. #770 3. #768 4. #750 5. #763 6. #772 7. #777 8. #778 9. #786 10. #787 11. #697 12. #718 13. #755 14. #796 15. #789 16. #804 17. #808 18. #809 19. #811 20. #810 Models were evaluated using checkpoint commit d7e52e5.
When the Gemini models output no content, the
api_response.candidates
will be[]
, and so callingapi_response.candidates[0].content.parts
will giveIndexError: list index out of range
. We should check if there is a candidate before accessing its content.