MCPcopy Create free account
hub / github.com/CompVis/diff2flow / signal_handler

Function signal_handler

train.py:197–199  ·  view source on GitHub ↗
(sig, frame)

Source from the content-addressed store, hash-verified

195 # once the signal was sent, the stop_training flag tells
196 # the pl module get ready for save checkpoint
197 def signal_handler(sig, frame):
198 print(f"Activate signal handler for signal {sig}")
199 module.stop_training = True
200
201 signal.signal(signal.SIGUSR1, signal_handler)
202

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected