Closed maksimstw closed 1 year ago
Thanks for the report! I've run on much larger datasets without encountering this error, so this might be an environment-specific issue. Could you share some information about:
Thanks for the quick reply!
@maksimstw : could you please try pulling this branch and see if it fixes your issues? https://github.com/zeno-ml/zeno-build/pull/125
If this doesn't work, it will probably be hard for me to debug the issue as I can't reproduce the problem, but I would definitely welcome any fixes!
The error is mainly due to "openai.error.APIConnectionError" and "openai.error.Timeout", which are not handled in your script. Those exceptions frequently occur when the user is using a VPN (especially for users in China). Those exceptions further result in an unclosed connector error. After properly handling those 2 exceptions, the script works as expected. You could also consider handling openai.error.InvalidRequestError as some prompts might be filtered by OpenAI API.
Oh, great, thanks a lot! If you could send a PR with the additional exception handling that would be greatly appreciated.
@neubig: could you please review my pull request #126? Thank you!
Done, thanks for the contribution! Closing the issue: https://github.com/zeno-ml/zeno-build/pull/126
I was using openai_utils.py for ChatGPT inference. It always worked fine for the first couple hundred samples, and then it always crushed with the following error. I tried to lower
request_per_minute
but the problem persists.