fix(api): handle CUDA memory errors in workers
This commit is contained in:
parent
a2e21f427f
commit
b2eb406197
|
@ -60,7 +60,7 @@ def worker_main(context: WorkerContext, server: ServerContext):
|
|||
)
|
||||
exit(EXIT_ERROR)
|
||||
except Exception as e:
|
||||
if "Failed to allocate memory" in str(e):
|
||||
if "Failed to allocate memory" in str(e) or "CUDA out of memory" in str(e):
|
||||
logger.error("detected out-of-memory error, exiting: %s", e)
|
||||
exit(EXIT_MEMORY)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue