noggin.utils.save_metrics

noggin.utils.save_metrics(path: Union[str, pathlib.Path], liveplot: Union[noggin.plotter.LivePlot, noggin.logger.LiveLogger, None] = None, *, train_metrics: Dict[str, Dict[str, numpy.ndarray]] = None, test_metrics: Dict[str, Dict[str, numpy.ndarray]] = None)[source]

Save live-plot metrics to a numpy zipped-archive (.npz). A LivePlot-instance can be supplied, or train/test metrics can be passed explicitly to the function.

Parameters:
path: PathLike

The file-path used to save the archive. E.g. ‘path/to/saved_metrics.npz’

liveplot : Optional[noggin.LivePlot]

The LivePlot instance whose metrics will be saves.

train_metrics : Optional[OrderedDict[str, Dict[str, numpy.ndarray]]]]
‘<metric-name>’ -> {‘batch_data’ -> array,

‘epoch_domain’ -> array, ‘epoch_data’ -> array}

test_metrics : Optional[OrderedDict[str, Dict[str, numpy.ndarray]]]]
‘<metric-name>’ -> {‘batch_data’ -> array,

‘epoch_domain’ -> array, ‘epoch_data’ -> array}