class<function save_npz>, task=None)[source]

Snapshot writer that uses process queue.

This class creates a process and a queue by multiprocessing module. The process will be a consumer of this queue, and the main process will be a producer of this queue.


Forking a new process from MPI process might be danger. Consider using ThreadQueueWriter instead of ProcessQueueWriter if you are using MPI.


__call__(filename, outdir, target)[source]

Invokes the actual snapshot function.

This method is invoked by a Snapshot object every time it takes a snapshot.

  • filename (str) – Name of the file into which the serialized target is saved. It is a concrete file name, i.e. not a pre-formatted template string.

  • outdir (str) – Output directory. Corresponds to Trainer.out.

  • target (dict) – Serialized object which will be saved.


Finalizes the wirter.

Like extensions in Trainer, this method is invoked at the end of the training.

save(filename, outdir, target, savefun, **kwds)[source]
__eq__(value, /)

Return self==value.

__ne__(value, /)

Return self!=value.

__lt__(value, /)

Return self<value.

__le__(value, /)

Return self<=value.

__gt__(value, /)

Return self>value.

__ge__(value, /)

Return self>=value.