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
logging.debug("MultiThreadedGenerator: shutting down workers...")
[i.terminate() foriinself._processes]
In my project, my main process has a sigterm-handler set up, which was meant to stop the process via SIGTERM at the end of my training, shown as follow:
However, the following problem occurs when working with MultiThreadedAugmenter's terminate(): when the child process is created, it forks all the methods of the main process, including my sigterm-handler, which causes MultiThreadedAugmenter's ending SIGTERM will be caught by the sigterm-handler, which will directly end my training process.
A temporary solution I came up with is to override the child process with a default signal handler signal.SIG_DFL, so that the SIGTERM of the child process does not trigger the sigterm-handler forked from main process, which means adding one line at the beginning of producer() function:
Hi, I noticed that the finish procedure in
MultiThreadedAumenter
uses theterminate()
method ofProcess
to end the child process by sending SIGTERM.batchgenerators/batchgenerators/dataloading/multi_threaded_augmenter.py
Lines 273 to 275 in 01f225d
In my project, my main process has a sigterm-handler set up, which was meant to stop the process via SIGTERM at the end of my training, shown as follow:
However, the following problem occurs when working with
MultiThreadedAugmenter
'sterminate()
: when the child process is created, it forks all the methods of the main process, including my sigterm-handler, which causesMultiThreadedAugmenter
's ending SIGTERM will be caught by the sigterm-handler, which will directly end my training process.A temporary solution I came up with is to override the child process with a default signal handler
signal.SIG_DFL
, so that the SIGTERM of the child process does not trigger the sigterm-handler forked from main process, which means adding one line at the beginning ofproducer()
function:Is it possible that a similar operation needs to be added to the source code to avoid the impact of the child process signal on the main process?
Thank you
The text was updated successfully, but these errors were encountered: