-
Notifications
You must be signed in to change notification settings - Fork 362
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
APIConnectionError: Connection error. #1094
Comments
I'm seeing this error, too. it's unfortunate because we process thousands of records in a batch and if it fails for one call the whole thing goes down and we lose the data. |
Hey @paulacanva there are a few anti patterns in your code. When you want to run many test cases on one metric, you should use the evaluate function: https://docs.confident-ai.com/docs/evaluation-introduction#evaluating-without-pytest We have throttling options, and even ignoring errors so you don't lose your data on error like how @jyyogi described. You can also cache your results so even if it errors you don't have to rerun everything the next time. The way you're using asyncio.gather will introduce a lot of bugs since each metric is stateful. In the evaluate function we handle everything so there's no overwriting of values. |
hey @penguine-ip - thanks for the quick reply here! I'm using Do you have an example of how
How does this work? How would I retry? |
❗BEFORE YOU BEGIN❗
Are you on discord? 🤗 We'd love to have you asking questions on discord instead: https://discord.com/invite/a3K9c8GRGt
Describe the bug
No matter what I try, I keep getting
APIConnectionError: Connection error.
when using deepeval only.I have a script that first generates predictions, calling OpenAI, for ~400 rows. I use asyncio + semaphores + backoff to handle issues. Everything runs fine and fast.
When I get to the deepeval part, I'm able to process 3 of those rows before getting
I'm running the deepeval through:
I'm not sure why this issue just happens with deepeval and how to solve it.
The text was updated successfully, but these errors were encountered: