PsyNeuLink
PsyNeuLink copied to clipboard
Running composition tests leaks memory
PR #2474 adds a simple leak detection on compiled tests; the code generator maintains a cache for every compiled PNL component. This cache uses WeakKeyDictionary so when the components get GC-ed it will remove the associated compiler data.
The check asserts that the WeakKeyDictionary is empty after running GC.
384 tests currently fail the assertion [0];
- all leaking tests construct and run Composition
- not all Composition tests leak memory (e.g.
tests/llvm/test_debug_composition.pypasses)
[0] https://github.com/PrincetonUniversity/PsyNeuLink/runs/7953304797?check_suite_focus=true
A leak check and a specialized leak test were added in #2992. The leak test was extended to more operations in #2997
Fixed in #3071 .