-
Notifications
You must be signed in to change notification settings - Fork 45
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
mac m1 tensorflow dependency #66
Comments
Hi @hmckay, |
I think you can install tensorflow on a mac, but miss out on a lot of performance gains (I'm not even sure tensorflow hooks into the GPU on the m1s properly). I'm not an expert on using tensorflow, but from what I can tell tensorflow and tensorflow-macos have the same functionality, but tensorflow-macos has been optimised for macs. Once it's been installed you import everything the same way as you would from tensorflow (so as far as I can tell it's just a pip issue) When I manually try to install using pip install . I get the following error: I modified the install_requires in setup.py to the following: install_requires=["numpy>=1.16", "scipy>=1.0", "scikit-learn>=0.2", "cvxopt>=1.2", "tensorflow>=2.0; platform_system !='Darwin' and platform_machine!='arm64'", "tensorflow-macos>=2.0; platform_system =='Darwin' and platform_machine=='arm64'", "tensorflow-metal; platform_system =='Darwin' and platform_machine=='arm64'"], I was then able to install with pip install . Edit: I think tensorflow-macos has also been optimised for the intel macs too, so the requirement of platform_machine=='arm64' may not be necessary |
Hi @hmckay, if OS == "macos", then requirements = ["tensorflow>=2.0 OR tensorflow-macos>=2.0"] Do you think, we can do something like that in setup.py ? |
This seems to work for me (haven't tested it on anything other than a mac with tensorflow-macos installed though):
|
Hi @hmckay, |
Currently using a mac M1, I have tensorflow-deps, tensorflow-macos(2.9.0) and tensorflow-metal installed (all working fine), but when I try to "pip install adapt" I have the following conflict:
adapt 0.4.1 depends on tensorflow>=2.0
Checking my current tensorflow version:
python3 -c "import tensorflow as tf; print(tf.version)"
2.9.2
Is there a way to resolve this/ can you change the requirements so this package will work with tensorflow-macos?
The text was updated successfully, but these errors were encountered: