Skip to content

Commit 9e9a7f4

Browse files
committed
Update CHANGELOG.md, fix type
1 parent c21353b commit 9e9a7f4

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
### Added
77

8+
- Simple memory monitor / reporting
9+
[PR #663](https://github.com/aai-institute/pyDVL/pull/663)
810
- New stopping criterion `MaxSamples`
911
[PR #661](https://github.com/aai-institute/pyDVL/pull/661)
1012
- Introduced `UtilityModel` and two implementations `IndicatorUtilityModel`

src/pydvl/utils/monitor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
logger = logging.getLogger(__name__)
4040

4141
__state_lock = threading.Lock()
42-
__memory_usage = defaultdict(int) # pid -> bytes
42+
__memory_usage: defaultdict[int, int] = defaultdict(int) # pid -> bytes
4343
__peak_memory_usage = 0 # (in bytes)
4444
__monitoring_enabled = threading.Event()
4545
__memory_monitor_thread: threading.Thread | None = None
@@ -163,6 +163,7 @@ def end_memory_monitoring(log_level=logging.DEBUG) -> tuple[int, dict[int, int]]
163163
return 0, {}
164164

165165
__monitoring_enabled.clear()
166+
assert __memory_monitor_thread is not None
166167
__memory_monitor_thread.join()
167168

168169
with __state_lock:

0 commit comments

Comments
 (0)