Open
Description
See Issue Project-MONAI/MONAI#6626 relating to memory management and interaction with the garbage collector. One solution that we've tried before and had success with was to use the GarbageCollector
handler to clean unused references at certain times. This isn't ideal and not particularly Pythonic but without changes to the garbage collector to consider GPU memory there may be little choice. Certain design decisions and good practices can reduce the issue so a tutorial on the problem and how to deal with OOM issues would be really helpful.