Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Training classifier on Apple Silicon results in error related to prediction?, but works #46

Open
psobolewskiPhD opened this issue Jul 31, 2024 · 0 comments

Comments

@psobolewskiPhD
Copy link

This was first posted on image.sc :
https://forum.image.sc/t/napari-object-classification-apoc-failing-on-m2-mac/85733/1
I've hit the same thing: https://forum.image.sc/t/napari-object-classification-apoc-failing-on-m2-mac/85733/7?u=psobolewskiphd
Opening this issue as maybe this is a better place for discussion a workaround or fix.

Anyhow, I can use napari-apoc for segmentation on my M1 Max with no issue. But when training a classifier I get an error:

RuntimeError: clBuildProgram failed: BUILD_PROGRAM_FAILURE - clBuildProgram failed: BUILD_PROGRAM_FAILURE - clBuildProgram failed: BUILD_PROGRAM_FAILURE

Build on <pyopencl.Device 'Apple M1 Max' on 'Apple' at 0x1027f00>:

Compiler encountered an internal error

Despite the error the ObjectClassifier.cl is generated and it looks fine.
If I then use the napari-apoc > apply object classification widget and pass the path of the classifier, everything works just fine.
...but not if I use the tab in the train widget oddly enough.
If I comment out this line:


Then I don’t get the CL error so training works-- I just get the error related to the return type, but that's obviously easily fixable--so I guess the .predict right after .train seems to trigger the issue?

My env:
Python: 3.10.14 (arm64)
napari: 0.4.19.post1
napari-accelerated-pixel-and-object-classification: 0.14.1

@psobolewskiPhD psobolewskiPhD changed the title Training classifier on Apple Silicon results in error Training classifier on Apple Silicon results in error related to prediction?, but works Jul 31, 2024
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

No branches or pull requests

1 participant