Skip to content

Commit

Permalink
build: Disallow TensorFlow v2.16.1 (#2448)
Browse files Browse the repository at this point in the history
* tensorflow v2.16.1 breaks tensorflow-probability at import time with
  the Keras v3.0 API breaking change. Until Keras v3.0 is adopted in
  tensorflow-probability, tensorflow v2.16.1+ can't be used.
   - c.f. tensorflow/probability#1795
* Note that Apple silicon machines should revert to installing
  'tensorflow' instead of 'tensorflow-macos' for tensorflow v2.16.1+.
* Note that macos x86 builds of tensorflow will be deprecated and no
  longer released from tensorflow v2.17.0+.
  • Loading branch information
matthewfeickert authored Mar 9, 2024
1 parent 975ee43 commit af5d952
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@ Homepage = "https://github.com/scikit-hep/pyhf"

[project.optional-dependencies]
shellcomplete = ["click_completion"]
# TODO: Use 'tensorflow' for all platform_machine for tensorflow v2.16.x+
# NOTE: macos x86 support is deprecated from tensorflow v2.17.0 onwards.
tensorflow = [
"tensorflow>=2.7.0; platform_machine != 'arm64'", # c.f. PR #1962
"tensorflow-macos>=2.7.0; platform_machine == 'arm64' and platform_system == 'Darwin'", # c.f. PR #2119
"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
]
torch = ["torch>=1.10.0"] # c.f. PR #1657
Expand Down

0 comments on commit af5d952

Please sign in to comment.