avalanche.evaluation.metrics.MaxRAM
- class avalanche.evaluation.metrics.MaxRAM(every=1)[source]
The standalone RAM usage metric.
Important: this metric approximates the real maximum RAM usage since it sample at discrete amount of time the RAM values.
Instances of this metric keeps the maximum RAM usage detected. The start_thread method starts the usage tracking. The stop_thread method stops the tracking.
The result, obtained using the result method, is the usage in mega-bytes.
The reset method will bring the metric to its initial state. By default this metric in its initial state will return an usage value of 0.
- __init__(every=1)[source]
Creates an instance of the RAM usage metric.
- Parameters
every – seconds after which update the maximum RAM usage.
Methods
__init__
([every])Creates an instance of the RAM usage metric.
reset
()Resets the metric.
result
()Retrieves the RAM usage.
start_thread
()stop_thread
()update
()Attributes
stop_f
Flag to stop the thread.
max_usage
Main metric result.
thread
Thread executing RAM monitoring code