avalanche.evaluation.metrics.DiskUsage
- class avalanche.evaluation.metrics.DiskUsage(paths_to_monitor: Optional[Union[str, Path, Sequence[Union[str, Path]]]] = None)[source]
The standalone disk usage metric.
This metric can be used to monitor the size of a set of directories. e.g. This can be useful to monitor the size of a replay buffer,
- __init__(paths_to_monitor: Optional[Union[str, Path, Sequence[Union[str, Path]]]] = None)[source]
Creates an instance of the standalone disk usage metric.
The result method will return the sum of the size of the directories specified as the first parameter in KiloBytes.
- Parameters
paths_to_monitor – a path or a list of paths to monitor. If None, the current working directory is used. Defaults to None.
Methods
__init__
([paths_to_monitor])Creates an instance of the standalone disk usage metric.
get_dir_size
(path)reset
()Resets the metric.
result
()Retrieves the disk usage as computed during the last call to the update method.
update
()Updates the disk usage statistics.