Open esgomezm opened 2 years ago
This is a weird one... I tried this on linux and the commands work as expected (there are some test errors, but that's unrelated).
@esgomezm Could you try running this with bash instead of zshell?
Could someone with access to a mac also test this? @k-dominik or @akreshuk? Maybe we should also add Mac to the CI. @esgomezm is trying with this model: https://bioimage.io/#/?id=10.5072%2Fzenodo.849110
I think I saw this error before for some ImJoy plugins, I guess it's tensorflow-1 model right? Some tensorflow precompiled binary used instructions that are not supported by some old mac. There is little we can do about it except black list some tensorflow-1 versions for MacOS.
@esgomezm which mac version are you using?
@constantinpape As I understand, it's more about the CPU itself doesn't support those instructions, so we should also know whether it's an old mac hardware or not. @esgomezm Is it a new or old mac computer?
(Yes, I was thinking this might be BigSur / M1 related)
It's a new one with M1 processor
It's a new one with M1 processor
Oh, so @constantinpape you are right, then we need to perhaps to somehow detect that and use a tensorflow version compiled for that?
Did you install tesorflow via conda @esgomezm ?
Oh, so @constantinpape you are right, then we need to perhaps to somehow detect that and use a tensorflow version compiled for that?
I am not really sure how we could autodetect that, but we can maybe offer an environment file for BigSur. It seems like there are pip packages available: https://stackoverflow.com/questions/65521255/installing-tensorflow-on-mac-os-big-sur-with-pip (But note that it's very unlikely there will be anything for tf1, which might be needed for this model)
I am thinking about print a warning or error in the setup.py if it's M1. Here is some code made by others:
import platform
import subprocess
def isMac():
return platform.system() == "Darwin"
def getProcessorMac():
return subprocess.check_output(['sysctl','-n','machdep.cpu.brand_string']).decode('utf-8')
def isM1():
return getProcessorMac() == "Apple M1\n"
if(isMac()):
print(isM1())
Ref: https://www.youtube.com/watch?v=_uzZ5vD4uNw https://pastebin.com/B7d71D5G
I am thinking about print a warning or error in the setup.py if it's M1. Here is some code made by others:
Yes, that's a good solution for the setup.py. But it will still be tough to put together working envs for BigSur. I think for now we should add this and also add a warning to the README.
Did you install tesorflow via conda @esgomezm ?
Not sure. I followed your instructions which create a new conda
environment and pip
for the dependencies:
conda env create -f dev/environment-base.yaml
conda activate bio-core-dev
pip install -e . --no-deps
Yes, that is installing tf via conda, see https://github.com/bioimage-io/core-bioimage-io-python/blob/main/dev/environment-base.yaml#L17.
Hi!
I'm trying to test a model that pass the validation test but I get the following message, both with test-model and predict-image:
I'm testing it in macOS