scikit-hep / pyhf

pure-Python HistFactory implementation with tensors and autodiff
https://pyhf.readthedocs.io/
Apache License 2.0
274 stars 81 forks source link

build: Determine tensorflow-probability requirements from python version #2452

Closed matthewfeickert closed 3 months ago

matthewfeickert commented 3 months ago

Description


Checklist Before Requesting Reviewer

Before Merging

For the PR Assignees:

* Split the requirements for the 'tensorflow' extra into two different
  conditional groups by python_version.
   - Starting with tensorflow v2.16.1, multiple changes were made that simplifies
   the installation of tensorflow across platform_machine and Keras v3.0 was adopted.
   - tensorflow-probability did _not_ adopt Keras v3.0, but instead requires
   tf-keras. Starting in tensorflow-probability v0.24.0 the
   'tensorflow-probability[tf]' extra was added which includes all the required
   dependencies to be able to use tensorflow-probability with tensorflow v2.15+.
   - tensorflow v2.16.1 and tensorflow-probability v0.24.0 support Python 3.9+,
   so for Python 3.8 support the 'tensorflow' requirements need to use the
   previous more verbose conditionals.
* Reverts PR https://github.com/scikit-hep/pyhf/pull/2448
codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.28%. Comparing base (c09738d) to head (c97bb40). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2452 +/- ## ======================================= Coverage 98.28% 98.28% ======================================= Files 69 69 Lines 4539 4539 Branches 803 803 ======================================= Hits 4461 4461 Misses 45 45 Partials 33 33 ``` | [Flag](https://app.codecov.io/gh/scikit-hep/pyhf/pull/2452/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep) | Coverage Δ | | |---|---|---| | [contrib](https://app.codecov.io/gh/scikit-hep/pyhf/pull/2452/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep) | `97.86% <ø> (ø)` | | | [doctest](https://app.codecov.io/gh/scikit-hep/pyhf/pull/2452/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep) | `98.14% <ø> (ø)` | | | [unittests-3.10](https://app.codecov.io/gh/scikit-hep/pyhf/pull/2452/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep) | `96.29% <ø> (ø)` | | | [unittests-3.11](https://app.codecov.io/gh/scikit-hep/pyhf/pull/2452/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep) | `96.29% <ø> (ø)` | | | [unittests-3.8](https://app.codecov.io/gh/scikit-hep/pyhf/pull/2452/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep) | `96.32% <ø> (ø)` | | | [unittests-3.9](https://app.codecov.io/gh/scikit-hep/pyhf/pull/2452/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep) | `96.34% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

matthewfeickert commented 1 month ago

@MeeseeksDev backport to release/v0.7.x

lumberbot-app[bot] commented 1 month ago

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout release/v0.7.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:

    git cherry-pick -x -m1 adddb0797c564a0158a8e2e69a58ee1f98604bf7
  2. You will likely have some merge/cherry-pick conflict here, fix them and commit:

git commit -am 'Backport PR #2452: build: Determine tensorflow-probability requirements from python version'
  1. Push to a named branch:
git push YOURFORK release/v0.7.x:auto-backport-of-pr-2452-on-release/v0.7.x
  1. Create a PR against branch release/v0.7.x, I would have named this PR:

"Backport PR #2452 on branch release/v0.7.x (build: Determine tensorflow-probability requirements from python version)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.