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

Upgrading tf to 2.4.0 #280

Merged
merged 6 commits into from
Dec 16, 2020
Merged

Upgrading tf to 2.4.0 #280

merged 6 commits into from
Dec 16, 2020

Conversation

scarrazza
Copy link
Member

No description provided.

@stavros11
Copy link
Member

Have you tried our tests with tf2.4? I just tried and I get the following failure

AttributeError: module 'tensorflow' has no attribute 'python'

because we are using oom_error = tf.python.framework.errors_impl.ResourceExhaustedError in some exceptions in order to raise our own OOM error. If this is the only issue, I guess we could just find what is the corresponding error for tf2.4 and update accordingly, but we should do it in a way that does not break compatibility with older tf versions.

Note that pip still installs tf2.3.1 by default (unless we explicitly do pip install tensorflow==2.4.0rc1), which means that CI is not testing for tf2.4. We may want to update that as well.

@scarrazza scarrazza marked this pull request as draft November 15, 2020 19:21
@scarrazza
Copy link
Member Author

Yes, sorry for not being more explicit, this should be a draft PR to fix this https://github.com/Quantum-TII/qibo/network/alert/requirements.txt/tensorflow/open. As soon as pypi uploads the final tf release we can go ahead and fix/test the changes.

@scarrazza scarrazza changed the title upgrading tf to 2.4.0 [WIP] upgrading tf to 2.4.0 Nov 15, 2020
@scarrazza scarrazza changed the title [WIP] upgrading tf to 2.4.0 Upgrading tf to 2.4.0 Dec 15, 2020
@scarrazza scarrazza marked this pull request as ready for review December 15, 2020 14:19
@scarrazza
Copy link
Member Author

@stavros11 this should be ready to go.

@codecov
Copy link

codecov bot commented Dec 15, 2020

Codecov Report

Merging #280 (a128c68) into master (2aa3f16) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #280   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           56        56           
  Lines        10712     10716    +4     
=========================================
+ Hits         10712     10716    +4     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/qibo/tensorflow/cgates.py 100.00% <100.00%> (ø)
src/qibo/tensorflow/circuit.py 100.00% <100.00%> (ø)
...m_operators/python/ops/qibo_tf_custom_operators.py 100.00% <100.00%> (ø)
...ators/python/ops/qibo_tf_custom_operators_grads.py 100.00% <100.00%> (ø)
src/qibo/tensorflow/distcircuit.py 100.00% <100.00%> (ø)
src/qibo/tests/test_custom_operators.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2aa3f16...a128c68. Read the comment docs.

Copy link
Member

@stavros11 stavros11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates, for me it works with tf2.4 on CPU. I could not test on GPU yet due to the CUDA issue (tf2.4 requires CUDA 11 while I had 10.1).

I would expect this to be fine on GPU but if you already have a tf2.4 GPU configuration installed in any machine it would be great to confirm this by running the tests there.

@scarrazza
Copy link
Member Author

@stavros11 I have checked using anaconda with python38, tf2.4.0 cuda11. Tests are passing on GPU. I will retry on other systems and then merge.

@scarrazza
Copy link
Member Author

I confirm that tests are passing even with python3.9 and cuda 11.1.

@scarrazza scarrazza merged commit 4b2c72b into master Dec 16, 2020
@scarrazza scarrazza deleted the tf240 branch February 6, 2021 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants