CellProfiler / CellProfiler-plugins

Community-contributed and experimental CellProfiler modules.
http://plugins.cellprofiler.org/
56 stars 67 forks source link

added delete model to runCellPose #137

Closed rsenft1 closed 2 years ago

rsenft1 commented 2 years ago

So GPU memory is flushed after running

rsenft1 commented 2 years ago

Note: this creates issues if running multiple workers! Need to run only 1 worker in CellProfiler > Preferences > Maximum number of workers = 1

bethac07 commented 2 years ago

Thanks! Did you get a chance to test if this is needed in small 2D cases or only large 3D ones?

rsenft1 commented 2 years ago

Ah yes, thank you for reminding me. So what I did was use the translocation tutorial dataset and pipeline, but replacing identifyprimaryobjects with runcellpose. Somewhat surprisingly to me, this also ran out of memory (clearing the cache must really do nothing if that model variable isn't deleted)! Though taking a look at this error message, it's a little weird. Free + Allocated != Total memory. Maybe the cache doesn't count toward either and makes up the difference? In any case, works just fine with the 'del model' insert and running with 1 worker with the translocation dataset. image