DiskSaver#
- class ignite.handlers.DiskSaver(dirname, atomic=True, create_dir=True, require_empty=True, **kwargs)[source]#
Handler that saves input checkpoint on a disk.
- Parameters
dirname (str) – Directory path where the checkpoint will be saved
atomic (bool) – if True, checkpoint is serialized to a temporary file, and then moved to final destination, so that files are guaranteed to not be damaged (for example if exception occurs during saving).
create_dir (bool) – if True, will create directory
dirname
if it doesnt exist.require_empty (bool) – If True, will raise exception if there are any files in the directory
dirname
.kwargs (Any) – Accepted keyword arguments for torch.save or xm.save.
Changed in version 0.4.2: Accept
kwargs
for torch.save or xm.save.Methods
Method to remove saved checkpoint.