🌐 AI搜索 & 代理 主页
Skip to content

Commit 689ac9e

Browse files
authored
Store errors in thread status (#1263)
1 parent 75d341b commit 689ac9e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pgml-extension/src/bindings/transformers/transformers.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,9 @@ def streaming_worker(worker_threads, model, **kwargs):
187187
worker_threads.update_thread(thread_id, "Error setting data")
188188
try:
189189
model.generate(**kwargs)
190-
except BaseException as error:
191-
print(f"Error in streaming_worker: {error}", file=sys.stderr)
192-
finally:
193190
worker_threads.delete_thread(thread_id)
191+
except BaseException as error:
192+
worker_threads.update_thread(thread_id, f"Error in streaming_worker: {error}")
194193

195194

196195
class GGMLPipeline(object):

0 commit comments

Comments
 (0)