Sofie Seilnacht
Sofie Seilnacht

Reputation: 29

TensorFlow Metal not installable on M2 MacBook and Github page is down

I've been attempting to install tf metal on my computer so that I can use GPUs instead of CPUs. I have tf macOS installed already, and I am fully updated with pip and tf. I'm currently 2 months into building and training a tf CNN, and I'm at the point where training a single epoch for my network will take a week (I have a lot of data that I need to use). I desperately need to use GPUs but am stuck with CPUs for now. I can't get access to a cluster, so the best I can do is continue to use my M2 MacBook. Is there a way I can work around not being able to install tf metal?

I keep getting this error message: "ERROR: Could not find a version that satisfies the requirement tensorflow-metal (from versions: none) ERROR: No matching distribution found for tensorflow-metal"

I looked on apple forums, tried to download it from GitHub (the page is down), and anything else I could think of and/or find on the internet to help, but it still isn't installing.

I've used the following commands and still no luck:

Any help would be appreciated! Thanks so much!

Upvotes: 2

Views: 1332

Answers (2)

lsoto
lsoto

Reputation: 11

I am a sysadmin that started as MLOPs, so please bear with me... This could be wrong... But I managed to install it using

  • Python 3.11 (brew vent)
  • a requirements.txt file to fix the following packages versions:
  • Tensorflow fixed to version 2.17 (2.17.1)
  • tensorflow-metal to 1.1.0 (latest, sep 2023...)
  • tf_keras 2.17.0

I do not use Conda. My company does not use it. But the packages version should be pretty similar a part of some dependencies I read people speaking about Conda (Conda install apple) (https://medium.com/@jarondlk/installing-tensorflow-metal-on-apple-silicon-macos-with-miniconda-f43121fe3054 as ONE example)

Upvotes: 1

Klaus Bremer
Klaus Bremer

Reputation: 1

I'm on a M1 pro and the lastest combination working is Python 3.11 with tensorflow 2.15 and tensorflow-metal 1.1.0, both installable py PyPi. It has been reported that keras 3 makes no use of the GPU (at least on macos), but I have not tested this. tensorflow 2.15 ist the last version with keras 2. If this does not work for you, it could be an issue with the M2.

Upvotes: 0

Related Questions