Skip to content

Update runcellpose.py (to fix the 'y_label unbound' error on MacOS using Cellpose 4 with MPS)#305

Open
davewabbo wants to merge 1 commit into
CellProfiler:masterfrom
davewabbo:master
Open

Update runcellpose.py (to fix the 'y_label unbound' error on MacOS using Cellpose 4 with MPS)#305
davewabbo wants to merge 1 commit into
CellProfiler:masterfrom
davewabbo:master

Conversation

@davewabbo
Copy link
Copy Markdown

Fix enabled using Chatgpt. Reuploaded sorry I'm new to pushing on Github!

"UnboundLocalError: local variable 'y_data' referenced before assignment" - this can be continued but leads to the worker failing to run Cellpose on a particular image. This occurs randomly and does not occur when running only 1 worker.

My basic intuition suggests it is some MPS (Apple GPU) issue since I cant set the GPU memory share since that apparently might be done automatically by pytorch. This is more of a band-aid approach until pytorch itself is updated.

I have CP4 and Cellpose(v4) plugin running on MacOS in its own conda env

CP4-cellpose4_macos_unbound-workaround-fix

re-uploaded CP4-cellpose4_macos_unbound-workaround-fix.

I have CP4 and Cellpose(v4) plugin running on MacOS in its own conda env
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant