-
Notifications
You must be signed in to change notification settings - Fork 90
feat: Migrate to TensorFlow v2.0 #541
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
Conversation
TODO:
References: |
Until |
b15ec30
to
5fef166
Compare
cfca435
to
f753c27
Compare
Given the decision to revert the addition of "improvement" in |
097c4bf
to
40d8243
Compare
f753c27
to
24a8295
Compare
24a8295
to
33d8bc2
Compare
Codecov Report
@@ Coverage Diff @@
## master #541 +/- ##
=========================================
+ Coverage 94.86% 94.96% +0.1%
=========================================
Files 52 52
Lines 2763 2742 -21
Branches 392 385 -7
=========================================
- Hits 2621 2604 -17
+ Misses 97 95 -2
+ Partials 45 43 -2
Continue to review full report at Codecov.
|
The coverage needs to get fixed here https://codecov.io/gh/scikit-hep/pyhf/pull/541/diff?src=pr&el=tree#D3-102 but other than that this looks like it is almost ready for review. |
I've queued this up. When it gets merged, I'll create a patch release from v0.3.2 → v0.3.3 which includes the following 5 change(s) [including this PR]: If you make any more changes, you probably want to re-trigger me again by removing the bumpversion/patch label and then adding it back again.
|
Use tf.where from TF 2.0 API
Need to add tf.errors.InvalidArgumentError to errors caused by invalid shape addition
These checks were meant for managing the session's graph, but with Sessions being a legacy component of TF v1.0 there is no need and can use the same 'tolist' as NumPy and PyTorch
fc1fcb5
to
ad5ba15
Compare
No this does enable eager execution. If you check out the docstrings that I added that's what we'll be getting from now on. If we want to move to lazy eval then we'll need to revise this. |
ah right, sorry I overlooked this |
No I should have mentioned this in the PR body. I've now updated the commit history message for it. |
setup.py
Outdated
'tensorflow': [ | ||
'tensorflow~=2.0', | ||
'tensorflow-probability~=0.8', | ||
'numpy<2.0,>=1.16.0', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to keep this around given: https://github.com/tensorflow/tensorflow/blob/5364121e858be715439c328c5f67de8441050f4b/tensorflow/tools/pip_package/setup.py#L61
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we can simplify that to just drop that totally. Good point!numpy~=1.16
Triggered by #541 via GitHub Actions.
Description
Resolves #539
Instead of adding conditional control flows through PR #535 and PR #537 in support of PR #534 , PR #534 will be delayed in favor of migrating to TensorFlow v2.0, where eager evaluation will avoid the issues that PR #535 and PR #537 addressed.
Checklist Before Requesting Reviewer
Before Merging
For the PR Assignees: