pythonlessons / mltu

Machine Learning Training Utilities (for TensorFlow and PyTorch)
MIT License
160 stars 100 forks source link

Impossible to solve contradiction in dependencies on Mac M1. #29

Closed krunduev closed 11 months ago

krunduev commented 11 months ago

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. tf2onnx 1.14.0 requires flatbuffers<3.0,>=1.12, but you have flatbuffers 23.5.26 which is incompatible.

Tried different version of mltu and TensorFlow for M1 (https://developer.apple.com/metal/tensorflow-plugin/)

With others TensorFlow versions have others issues.

pythonlessons commented 11 months ago

Hi, in the newest mltu versions, I removed all dependencies with TensorFlow and PyTorch, so that the user could choose the framework he wants.

I noticed that there are issues with flatbuffers package, and you may face this if you have some other package that requires one version of it and for example tensorflow requires another version of it. But usually you should install the right version manually

krunduev commented 11 months ago

The TensorFlow M1 library for Mac lags behind other platforms. Currently, there is version 2.13.0.

I encountered incompatibility with typing_extensions and tf2onnx. TensorFlow for Mac requires flatbuffers 23.5.26, while tf2onnx 1.14.0 requires flatbuffers <3.0, >=1.12.

With typing_extensions, it's the opposite. mltu needs a later version, but TensorFlow requires an earlier one.

I resolved this issue by switching to Google Colab.

krunduev commented 11 months ago

I don't see a reason to spend time trying to run it on a Mac, as the training speed will still be insufficient.