torchtnt.utils.memory.measure_rss_deltas¶
-
torchtnt.utils.memory.
measure_rss_deltas
(rss_deltas: List[int], interval: timedelta = datetime.timedelta(microseconds=100000)) Generator[None, None, None] ¶ A context manager that periodically measures RSS (resident set size) delta.
The baseline RSS is measured when the context manager is initialized.
Parameters: - rss_deltas – The list to which the measured RSS deltas (measured in bytes) are appended.
- interval – The interval at which RSS deltas are measured.