-
Notifications
You must be signed in to change notification settings - Fork 137
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
Upgrade to Tensorflow 2 #1596
Upgrade to Tensorflow 2 #1596
Conversation
cbba49c
to
f8b90f4
Compare
Job Test Fedora 32 on f8b90f4 : invalidated by @joshua-cogliati-inl restarted civet |
Switching dependency to tensorflow 2.0 Removed unneeded Session code. acc renamed to accuracy Switching to tensorflow random.set_seed. Removing old code needed for tensorflow 1
f8b90f4
to
90ebf62
Compare
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.
Thank you Josh!. Just one minor comment for your consideration.
@@ -40,7 +40,7 @@ Note all install methods after "main" take | |||
<matplotlib>3.2</matplotlib> | |||
<statsmodels/> | |||
<cloudpickle>1.6</cloudpickle> | |||
<tensorflow>1.15</tensorflow> | |||
<tensorflow>2.0</tensorflow> |
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.
Can we loose the constraint on the version?
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.
I'll try that.
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.
(With the warning that unless we switch to default to the conda-forge channel it won't make much difference (except for pip installs) since conda's regular channel doesn't have anything newer than 2.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.
Hm, tensorflow 2.3 gives different classification results resulting in a diff error. https://civet.inl.gov/job/768524/
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.
tensorflow 2.1 also gives different values. https://civet.inl.gov/job/768517/
It looks like tensorflow 2.1 and 2.3 are the same.
So once we can get everything to something newer than 2.0 we should be fine, but for now I think I will revert to 2.0 since most of our conda machines are stuck at that.
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.
That is good. Thanks.
Job Test qsubs on 90ebf62 : invalidated by @joshua-cogliati-inl failed tests/cluster_tests/RavenRunsRaven/ROM |
I tried |
Hi @joshua-cogliati-inl , what do you think if we move our default conda channel to conda-forge channel (not for this PR but for future)? I see the following benefits:
|
I think that it would make sense. It would let us use tensorflow 2.4 and python 3.8, both of which are held back by the other conda version right now. |
Job Mingw Test on 1955050 : invalidated by @joshua-cogliati-inl mingw was busy |
1955050
to
d5c91f2
Compare
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.
changes are good.
Checklist is satisfied, and all tests passed. |
@joshua-cogliati-inl I have merged your PR. Nice work and thanks. |
Job Test CentOS 7 on 1955050 : invalidated by @joshua-cogliati-inl checking civet. |
Pull Request Description
What issue does this change request address?
Closes #1595
What are the significant changes in functionality due to this change request?
Upgrades the Tensorflow version from 1.15 to 2.0.
This mainly requires removing the old Session api that Tensorflow 2 does not support.
For Change Control Board: Change Request Review
The following review must be completed by an authorized member of the Change Control Board.
<internalParallel>
to True.raven/tests/framework/user_guide
andraven/docs/workshop
) have been changed, the associated documentation must be reviewed and assured the text matches the example.