mlcommons / GaNDLF

A generalizable application framework for segmentation, regression, and classification using PyTorch
https://gandlf.org
Apache License 2.0
150 stars 78 forks source link

Memory build-up on various locations #806

Open hasan7n opened 4 months ago

hasan7n commented 4 months ago

When using the FeTS tool (script), we noticed two sources of memory build-up:

  1. Memory build-up due to figure_generator (lines), around 200MB per call.
  2. Memory build-up due to GaNDLF's main_run function (lines), around 400MB per call.

Further profiling of GaNDLF'S main_run showed the information below (note: the profiling was done on GaNDLF's commit 616b37bafad8f89d5c816a88f44fa30470601311)

sarthakpati commented 4 months ago

Thanks for the detailed report!

I am guessing the main_run buildup could be related to #780, but this needs to be investigated.

hasan7n commented 4 months ago

FWIW, this is the memory profiler used: https://pypi.org/project/memory-profiler/

sarthakpati commented 4 months ago

FYI, 1 is not in GaNDLF, and is a different library (https://github.com/CBICA/FigureGenerator). Though the underlying dependencies are very similar (SimpleITK and numpy).

github-actions[bot] commented 2 months ago

Stale issue message

Ainesh06102004 commented 1 month ago

i can tackle this issue

sarthakpati commented 1 month ago

i can tackle this issue

Thanks! I am assuming that this will relate to #780 as well.