Skip to content
Snippets Groups Projects
Commit aafabb96 authored by Daniel CARRON's avatar Daniel CARRON :b: Committed by André Anjos
Browse files

Fixed resource monitoring

parent e46a1211
No related branches found
No related tags found
1 merge request!6Making use of LightningDataModule and simplification of data loading
......@@ -342,8 +342,10 @@ def _monitor_worker(
ra.acc() # guarantees at least an entry will be available
if summary_event.is_set():
queue.put(ra.summary())
summary = ra.summary().copy()
queue.put(summary)
ra.clear()
print(queue.get())
summary_event.clear()
time.sleep(interval)
......@@ -416,7 +418,6 @@ class ResourceMonitor:
"""Forces the monitoring process to yield data and clear the internal
accumlator."""
self.summary_event.set()
try:
data: dict[str, list[int | float]] = self.q.get(
timeout=2 * self.interval
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment