-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Launching threads/async in DSPy 2.5.30+ without DSPy threading primitives #1812
Comments
Hey @italianconcerto ! I don't think the code you posted will result in the error you posted. However, if you're using threading or async then it may happen. Can you share more about how you're setting up threading or async? |
I relaxed that error, so you'll get a warning now if you upgrade to DSPy 2.5.31 which is now released. The supported way to create threads or async threads is to use launchers in dspy, like: For async in particular, here are new docs on deployment with async/FastAPI: https://dspy.ai/tutorials/deployment/ |
I confirm that the error came after I ran that script but I also confirm that I tried to run an multi-threaded program with dspy. I assume so that the first run impacted the second? Weird behaviour |
@okhat Thanks, I couldn't find it in the docs before |
Thank you @italianconcerto ! Did this change resolve the issue? |
If I run this I get something like:
It's like this with either python 3.10 and 3.12.
The text was updated successfully, but these errors were encountered: