Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@
"py7zr",
"rarfile>=4.0",
"s3fs>=2021.11.1", # aligned with fsspec[http]>=2021.11.1
"tensorflow>=2.3,!=2.6.0,!=2.6.1",
"tensorflow>=2.3,!=2.6.0,!=2.6.1; sys_platform != 'darwin' or platform_machine != 'arm64'",
"tensorflow-macos; sys_platform == 'darwin' and platform_machine == 'arm64'",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW I think and platform_machine == 'arm64'" is not needed, as I was able to install tensorflow-macos on my MacOS with an Intel chip

$ sysctl -a | grep Intel
machdep.cpu.vendor: GenuineIntel
machdep.cpu.brand_string: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz

See https://github.com/huggingface/datasets-server/blob/9b346a79c5e3f51719fb2717683c4e5f86291201/services/worker/pyproject.toml#L34-L35

But maybe it's better to limit the exception cases and only use the fork for arm64.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@severo I'm not an expert on this subject. But it appears they recommend tensorflow-macos also for Intel x86-64: https://developer.apple.com/metal/tensorflow-plugin/

So you think I can safely remove and platform_machine == 'arm64'? Or better keeping to reduce the scope?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't know, I just wanted to share my recent experience with the same problem, and use the same solution if you opt for a reduced scope.

"torch",
"torchaudio<0.12.0",
"soundfile",
Expand Down Expand Up @@ -172,7 +173,10 @@
"audio": AUDIO_REQUIRE,
"vision": VISION_REQURE,
"apache-beam": ["apache-beam>=2.26.0"],
"tensorflow": ["tensorflow>=2.2.0,!=2.6.0,!=2.6.1"],
"tensorflow": [
"tensorflow>=2.2.0,!=2.6.0,!=2.6.1; sys_platform != 'darwin' or platform_machine != 'arm64'",
"tensorflow-macos; sys_platform == 'darwin' and platform_machine == 'arm64'",
],
"tensorflow_gpu": ["tensorflow-gpu>=2.2.0,!=2.6.0,!=2.6.1"],
"torch": ["torch"],
"s3": [
Expand Down