Closed lambdaofgod closed 1 year ago
Error details when running lml run
with a file:
Exception ignored in: <function AsyncOpenAIAPI.__del__ at 0x7faf6116aa70>
Traceback (most recent call last):
File "/home/kuba/Projects/forks/lmql/src/lmql/runtime/bopenai/batched_openai.py", line 553, in __del__
File "/etc/conda/envs/lmql/lib/python3.10/asyncio/events.py", line 656, in get_event_loop
RuntimeError: There is no current event loop in thread 'MainThread'.
Thanks for reporting this. Does the query otherwise finish execution, or does it not execute at all?
Query finishes. In app the problem is that every next call does not work.
I think I have observed this before on Linux systems specifically. This is very likely a asyncio clean-up issue. I will investigate this.
When you say "next call", what exactly do you mean? Once the query finishes, lmql run
should have terminated, right?
I mean in web app.
Okay, thank. I will investigate further and report back here. If you run locally, the playground will actually re-run a new lmql process on each query. So it seems odd that it would block the next call.
Seeing the exact same problem here as well (running on Arch Linux)
I just released a bug fix release lmql==0.0.4.2, where this issue should be fixed. It would be really cool, if anyone who has experienced this bug, could briefly report back, if this is fixed.
When I run
lmql run
on your joke example, or usinglml playground
I get that RuntimeError.BTW thanks for a great initiative.