-
Notifications
You must be signed in to change notification settings - Fork 198
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
Running asyncio.get_event_loop().run_until_complete(query(args)) more than once deadlocks program #36
Comments
I think there may be an issue with worker threads being shut down after the first completion. I will investigate a bit and report here. For now, usually when running multiple queries in sequence, I would suggest a pattern like this:
|
Thank you for the quick answer. sadly I am calling the functions from within a |
I see. For this you may want to have a look at how we bridge async/non-async for langchain integration, see https://github.com/eth-sri/lmql/blob/main/src/lmql/runtime/langchain.py Bascially, if possible try re-using the event loop. Still, I will see what I can do to enable your initial use. |
Thanks a lot!! I am triying to see exactly where it gets locked to have a better idea on whats happening |
It worked thanks!! |
for
if I run
it executes just fine, but the second time it seems to produce a deadlock
The text was updated successfully, but these errors were encountered: