Skip to content

Commit

Permalink
Store errors in thread status (postgresml#1263)
Browse files Browse the repository at this point in the history
  • Loading branch information
SilasMarvin authored Jan 2, 2024
1 parent 75d341b commit 689ac9e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pgml-extension/src/bindings/transformers/transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,9 @@ def streaming_worker(worker_threads, model, **kwargs):
worker_threads.update_thread(thread_id, "Error setting data")
try:
model.generate(**kwargs)
except BaseException as error:
print(f"Error in streaming_worker: {error}", file=sys.stderr)
finally:
worker_threads.delete_thread(thread_id)
except BaseException as error:
worker_threads.update_thread(thread_id, f"Error in streaming_worker: {error}")


class GGMLPipeline(object):
Expand Down

0 comments on commit 689ac9e

Please sign in to comment.