Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to using 'tensorflow' for Apple silicon Macs for TensorFlow v2.16.1+ #2449

Closed
matthewfeickert opened this issue Mar 9, 2024 · 2 comments · Fixed by #2452
Closed
Assignees
Labels
build Changes that affect the build system or external dependencies

Comments

@matthewfeickert
Copy link
Member

matthewfeickert commented Mar 9, 2024

As noted in PR #2448, the tensorflow v2.16.1 release notes mention:

  • Apple Silicon users: If you previously installed TensorFlow using pip install tensorflow-macos, please update your installation method. Use pip install tensorflow from now on.

  • Mac x86 users: Mac x86 builds are being deprecated and will no longer be released as a Pip package from TF 2.17 onwards.

This will require an effective revert of PR #2119 with the removal of

"tensorflow-macos>=2.7.0,!=2.16.1; platform_machine == 'arm64' and platform_system == 'Darwin'", # c.f. PR #2119, #2448

once tensorflow-probability supports Keras v3.0 and PR #2448 can be reverted.

@matthewfeickert matthewfeickert added the build Changes that affect the build system or external dependencies label Mar 9, 2024
@matthewfeickert matthewfeickert self-assigned this Mar 9, 2024
@matthewfeickert
Copy link
Member Author

cc @alexander-held as a bit of a heads up, though no action is needed now.

@matthewfeickert
Copy link
Member Author

matthewfeickert commented Mar 10, 2024

We should also apparently be using tensorflow-probability extra to use tensorflow with tensorflow-probability.

tensorflow/probability#1796

So

pyhf/pyproject.toml

Lines 72 to 76 in af5d952

tensorflow = [
"tensorflow>=2.7.0,!=2.16.1; platform_machine != 'arm64'", # c.f. PR #1962, #2448
"tensorflow-macos>=2.7.0,!=2.16.1; platform_machine == 'arm64' and platform_system == 'Darwin'", # c.f. PR #2119, #2448
"tensorflow-probability>=0.11.0", # c.f. PR #1657
]

can get reduced to just

tensorflow = ["tensorflow-probability[tf]>=0.24.0"]

or whatever the next release of tensorflow-probability is after v0.23.0 that includes tensorflow/probability@988f023 in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Changes that affect the build system or external dependencies
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant