PythonOT/POT

Issue with Importing POT Library in Apple Silicon Environment with TensorFlow

Opened this issue · 1 comments

Describe the bug

Hello,

First of all, thank you for sharing the POT library as open source.

When I try to import the POT library in an Apple Silicon environment with tensorflow-macos and tensorflow-metal installed, the cell enters an infinite loading state.

According to the README, it states that usage on Mac has been tested. Are there any dependencies I might have missed or additional considerations required?

Thank you.

To Reproduce

Steps to reproduce the behavior:

  1. install tensorflow-mac and tensorflow-metal on conda environment
  2. install POT

Screenshots

image

Code sample

import ot

Expected behavior

Environment (please complete the following information):

  • OS (e.g. MacOS, Windows, Linux): MacOS 14.4.1
  • Python version: 3.11
  • How was POT installed (source, pip, conda): conda
  • Build command you used (if compiling from source):

Output of the following code snippet:

import platform; print(platform.platform())
import sys; print("Python", sys.version)
import numpy; print("NumPy", numpy.__version__)
import scipy; print("SciPy", scipy.__version__)
import ot; print("POT", ot.__version__)

macOS-10.16-x86_64-i386-64bit
Python 3.11.9 (main, Apr 19 2024, 11:44:45) [Clang 14.0.6 ]
NumPy 1.26.4
SciPy 1.11.4
### import ot; print("POT", ot.__version__) is not working, just infinite loading

Additional context

Yes POT has been tested on macos and it should work, but we do not have financing to test implementation on CPU/Metal devices and test only on cpu versions of tensorflow... I do not have a mac so I cannot personally debug this one but I will search for another POT contributor to look at it.

Feel free to send us more information (does it bug with pip versons of POT/tensorflow?)