Unverified Commit 084a01fd authored by Anthony Platanios's avatar Anthony Platanios Committed by GitHub
Browse files

[Bugfix] [Easy] Fixed a bug in the multiprocessing GPU executor. (#6770)

parent 062a1d0f
import asyncio
import os
import signal
import threading
import weakref
from functools import partial
from typing import Any, List, Optional
......@@ -115,6 +116,7 @@ class MultiprocessingGPUExecutor(DistributedGPUExecutor):
if executor := ref():
executor.shutdown()
if threading.current_thread() is threading.main_thread():
signal.signal(signal.SIGINT, shutdown)
signal.signal(signal.SIGTERM, shutdown)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment