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

Function stop_training_method

train.py:183–191  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

181
182 # hacky way to avoid define this in the traininer module
183 def stop_training_method():
184 module.stop_training = False
185 print("-" * 40)
186 print("Try to save checkpoint to {}".format(ckpt_dir))
187 module.trainer.save_checkpoint(os.path.join(ckpt_dir, "interrupted.ckpt"))
188 module.trainer.should_stop = True
189 module.trainer.limit_val_batches = 0
190 print("Saved checkpoint.")
191 print("-" * 40)
192
193 module.stop_training_method = stop_training_method
194

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected