Giter VIP home page Giter VIP logo

Comments (7)

cbrnr avatar cbrnr commented on June 16, 2024

That's weird, I get the same (or at least similar error) on my Intel Mac (I only tested on my M2 Mac previously). My idea was to provide optimized builds/packages for Macs, meaning native ARM64 support (tensorflow-macos) as well as Metal support (tensorflow-macos) for 3.8 <= Python <= 3.11. The "official" tensorflow package does not support ARM64.

Do you know which requirements exactly cannot be satisfied? A tensorflow-macos wheel should be available for your platform (https://pypi.org/project/tensorflow-macos/#files). I get this error with tensorflow-metal even though a matching package seems to be available.

If this cannot be resolved, I'm happy to revert to standard tensorflow (although it really bugs me that this still does not support ARM64, but there will be a wheel in the next release). Maybe we should have separate TF dependencies for each architecture?

from sleepecg.

richrobe avatar richrobe commented on June 16, 2024

I directly get an error when trying to manually install the mac-native tensorflow packages tensorflow-mac and tensorflow-metal via pip:

$ pip install tensorflow-macos
>>> ERROR: Could not find a version that satisfies the requirement tensorflow-macos (from versions: none)
>>> ERROR: No matching distribution found for tensorflow-macos
$ pip install tensorflow-metal
>>> ERROR: Could not find a version that satisfies the requirement tensorflow-metal (from versions: none)
>>> ERROR: No matching distribution found for tensorflow-metal

which is weird because, as you correctly pointed out, there should be a build available for my platform...

from sleepecg.

cbrnr avatar cbrnr commented on June 16, 2024

Strange. I think I tried installing just these packages yesterday, and it worked. Can you try and see if you can get more information out of pip with -vvv?

from sleepecg.

cbrnr avatar cbrnr commented on June 16, 2024

I can't really test this on my old Intel Mac, because I'm stuck with macOS 11.7.6. The problem is that the latest tensorflow-macos and tensorflow-metal versions require macOS 12, so unfortunately, I can't test this. I will check on my new ARM64 Mac though (I expect that everything works). Maybe the best solution is really to require tensorflow on Intel Macs and tensorflow-macos/tensorflow-metal on ARM64 Macs. I think it should be possible to specify these requirements in pyproject.toml.

from sleepecg.

cbrnr avatar cbrnr commented on June 16, 2024

OK, I'm pulling the plug on tensorflow-macos and tensorflow-metal in favor of the official tensorflow package. In addition to problems when installing these Apple-maintained packages, I also couldn't import one of our pre-trained models. In contrast, everything works fine with tensorflow (which BTW now has an ARM64 macOS package on PyPI anyway).

from sleepecg.

richrobe avatar richrobe commented on June 16, 2024

Alright, that's of course fine for me! Thank you for your efforts 🙂

from sleepecg.

cbrnr avatar cbrnr commented on June 16, 2024

The only downside is that it doesn't run on the GPU then. But it should still be plenty fast, and if someone really wants GPU support they can try and use the Apple-provided packages at their own risk.

from sleepecg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.