Tensorflow Federated with apple silicon

Hallo everyone,
how can i get tensorflow federated installed on apple silicon (MPB M1 Max)?
Python3.9

python3.9 -m pip install tensorflow-macos==2.9.2 tensorflow-metal==0.6.0 tensorflow-federated==0.37.0

shows error

Collecting tensorflow-federated==0.37.0
  Using cached tensorflow_federated-0.37.0-py2.py3-none-any.whl (903 kB)
ERROR: Could not find a version that satisfies the requirement tensorflow-compression==2.9.2 (from versions: none)
ERROR: No matching distribution found for tensorflow-compression==2.9.2

Python3.10


python3.10 -m pip install tensorflow-macos==2.10.0 tensorflow-metal==0.6.0 tensorflow-federated==0.37.0

shows error


Collecting tensorflow-macos==2.10.0
  Using cached tensorflow_macos-2.10.0-cp310-cp310-macosx_12_0_arm64.whl (211.5 MB)
ERROR: Ignored the following versions that require a different python version: 0.34.0 Requires-Python ~=3.9.0; 0.36.0 Requires-Python ~=3.9.0
ERROR: Could not find a version that satisfies the requirement tensorflow~=2.10.0 (from tensorflow-federated) (from versions: none)
ERROR: No matching distribution found for tensorflow~=2.10.0

Would really like to use tensorflow-federated with apple silicon and pip, since the tensorflow and metal just works fine both for python3.9 and python3.10.

The major issue seams to me that there is no pre-compiled tensorflow-compression package for apple silicon. Any suggestions on how to get tensorflwo-compression work on apple silicon will really be appreciated. (Use tensorflow compression with tensorflow federated on apple silicon · Issue #154 · tensorflow/compression · GitHub)

1 Like

With the following packages and execution sequence using pip works on M1, the orders in the sequence shall not be changd, more details can be found at Which version is ready for Mac with M1 Apple Silicon Chip? · Issue #1254 · tensorflow/federated · GitHub

python3 -m pip install tensorflow-macos==2.9.2 --no-cache-dir
python3 -m pip install attrs==21.4.0 dp-accounting==0.1.2 matplotlib==3.6.2 pandas==1.5.1 scikit-learn==1.1.3 tensorflow-datasets==4.5.2 tensorflow-probability==0.15 --no-cache-dir

python3 -m pip install farmhashpy==0.4.0 portpicker==1.5 semantic-version==2.6 tensorflow-model-optimization==0.7.3 tensorflow-privacy==0.8.4 --no-dependencies --no-cache-dir

python3 -m pip install jax==0.3.24 jaxlib==0.3.24 tensorflow-metal==0.5.1 numpy==1.23.4 --no-cache-dir
python3 -m pip install tensorflow-federated==0.34.0 --no-deps --no-cache-dir

I fall back to tensorflow-federated==0.34.0, since this version doesn’t use tensorflow-compression

Try the Answer from Jiahui-Bai from Which version is ready for Mac with M1 Apple Silicon Chip? · Issue #1254 · tensorflow/federated · GitHub. Worked for me.

Hi, I’m just wondering if now tensorflow federated has any support of its newer version (like 0.61.0) on apple silicon?