You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bound the wait for a token, and never generate twice at once
The screenshot finally separated the layers. The typed message and the
spinner both rendered, and the diagnostic cell answered in 2.9 seconds on
the same kernel — so display, threading, model and memory all work. Only
the form's generation never came back.
TextIteratorStreamer was built without a timeout, and its __next__ blocks
on an empty queue forever. If generation goes quiet the read never
returns, and the spinner cannot be escaped by construction. Removing the
timeout again reproduces the eternal spinner locally, which is the first
time this failure has been visible outside Colab.
The wait is now polled in short slices with a total budget, rather than
one long block. Same deadline, but no thread parked for minutes — a
blocked default-executor thread is joined at interpreter exit, so the
long form turned a regression into a hang even in the test suite. Now it
fails in twenty seconds and says what it was waiting for.
The screenshot also caught two generations running at once: the form's
submission was still in flight when the diagnostic cell called the same
pipeline. transformers pipelines are not thread-safe, and that is a
plausible way for the first one to have been left wedged. A second
concurrent generation is now refused outright instead of quietly
corrupting both, with the lock released in a finally so a crash cannot
lock the model away for the rest of the session.
The waiting bubble counts the seconds. A spinner that never changes is
indistinguishable from a dead one, which is exactly how this was read
each time it was reported.