Skip to content

Commit

Permalink
Revert "Upgrade to TensorFlow 2.5.0. (tensorflow#567)"
Browse files Browse the repository at this point in the history
This reverts commit 61822e6.
  • Loading branch information
MichaelBroughton authored May 15, 2021
1 parent 55a7510 commit 7c51d1d
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.7.2
3.1.0
40 changes: 18 additions & 22 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "com_google_absl",
sha256 = "f368a8476f4e2e0eccf8a7318b98dafbe30b2600f4e3cf52636e5eb145aba06a",
strip_prefix = "abseil-cpp-df3ea785d8c30a9503321a3d35ee7d35808f190d",
urls = [
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/abseil/abseil-cpp/archive/df3ea785d8c30a9503321a3d35ee7d35808f190d.tar.gz",
"https://github.com/abseil/abseil-cpp/archive/df3ea785d8c30a9503321a3d35ee7d35808f190d.tar.gz",
],
)

http_archive(
name = "com_google_googletest",
sha256 = "ff7a82736e158c077e76188232eac77913a15dac0b22508c390ab3f88e6d6d86",
Expand Down Expand Up @@ -43,11 +53,9 @@ protobuf_deps()
# com_google_protobuf depends on @bazel_skylib ??
http_archive(
name = "bazel_skylib",
sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
urls = [
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
],
sha256 = "bbccf674aa441c266df9894182d80de104cabd19be98be002f6d478aaa31574d",
strip_prefix = "bazel-skylib-2169ae1c374aab4a09aa90e65efe1a3aad4e279b",
urls = ["https://github.com/bazelbuild/bazel-skylib/archive/2169ae1c374aab4a09aa90e65efe1a3aad4e279b.tar.gz"],
)

http_archive(
Expand Down Expand Up @@ -77,28 +85,16 @@ http_archive(

http_archive(
name = "org_tensorflow",
sha256 = "e3d0ee227cc19bd0fa34a4539c8a540b40f937e561b4580d4bbb7f0e31c6a713",
strip_prefix = "tensorflow-2.5.0",
sha256 = "b91ec194ddf6c4a5a2f9d1db4af4daab0b187ff691e6f88142413d2c7e77a3bb",
strip_prefix = "tensorflow-2.4.1",
urls = [
"https://github.com/tensorflow/tensorflow/archive/v2.5.0.zip",
"https://github.com/tensorflow/tensorflow/archive/v2.4.1.zip",
],
)

load("@org_tensorflow//tensorflow:workspace3.bzl", "workspace")

workspace()

load("@org_tensorflow//tensorflow:workspace2.bzl", "workspace")

workspace()

load("@org_tensorflow//tensorflow:workspace1.bzl", "workspace")

workspace()

load("@org_tensorflow//tensorflow:workspace0.bzl", "workspace")
load("@org_tensorflow//tensorflow:workspace.bzl", "tf_workspace")

workspace()
tf_workspace(tf_repo_name = "@org_tensorflow")

load("//third_party/tf:tf_configure.bzl", "tf_configure")

Expand Down
10 changes: 5 additions & 5 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ As noted in the TensorFlow
guide, the <a href="https://bazel.build/" class="external">Bazel</a>
build system will be required.

Our latest source builds use TensorFlow 2.5.0. To ensure compatibility we use `bazel` version 3.7.2. To remove any existing version of Bazel:
Our latest source builds use TensorFlow 2.4.1. To ensure compatibility we use `bazel` version 3.1.0. To remove any existing version of Bazel:

<!-- common_typos_disable -->
<pre class="devsite-click-to-copy">
Expand All @@ -96,9 +96,9 @@ Download and install `bazel` version 3.1.0:

<!-- common_typos_disable -->
<pre class="devsite-click-to-copy">
<code class="devsite-terminal">wget https://github.com/bazelbuild/bazel/releases/download/3.7.2/bazel_3.7.2-linux-x86_64.deb
<code class="devsite-terminal">wget https://github.com/bazelbuild/bazel/releases/download/3.1.0/bazel_3.1.0-linux-x86_64.deb
</code>
<code class="devsite-terminal">sudo dpkg -i bazel_3.7.2-linux-x86_64.deb</code>
<code class="devsite-terminal">sudo dpkg -i bazel_3.1.0-linux-x86_64.deb</code>
</pre>
<!-- common_typos_enable -->

Expand All @@ -122,7 +122,7 @@ Finally, confirm installation of the correct `bazel` version:
### 4. Build TensorFlow from source

Here we adapt instructions from the TensorFlow [build from source](https://www.tensorflow.org/install/source)
guide, see the link for further details. TensorFlow Quantum is compatible with TensorFlow version&nbsp;2.5.
guide, see the link for further details. TensorFlow Quantum is compatible with TensorFlow version&nbsp;2.4.

Download the
<a href="https://github.com/tensorflow/tensorflow" class="external">TensorFlow source code</a>:
Expand All @@ -131,7 +131,7 @@ Download the
<pre class="devsite-click-to-copy">
<code class="devsite-terminal">git clone https://github.com/tensorflow/tensorflow.git</code>
<code class="devsite-terminal">cd tensorflow</code>
<code class="devsite-terminal">git checkout v2.5.0</code>
<code class="devsite-terminal">git checkout v2.4.1</code>
</pre>

Be sure the virtual environment you created in step 2 is activated. Then, install the TensorFlow dependencies:
Expand Down
3 changes: 1 addition & 2 deletions release/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def finalize_options(self):

# placed as extra to not have required overwrite existing nightly installs if
# they exist.
EXTRA_PACKAGES = ['tensorflow == 2.5.0']
EXTRA_PACKAGES = ['tensorflow == 2.4.1']
CUR_VERSION = '0.5.0'


Expand Down Expand Up @@ -106,7 +106,6 @@ def has_ext_modules(self):
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Scientific/Engineering :: Mathematics',
Expand Down
9 changes: 2 additions & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
cirq==0.11.0
sympy==1.5
numpy==1.19.5 # TensorFlow can detect if it was built against other versions.
nbconvert==5.6.1
nbformat==4.4.0
pylint==2.4.4
yapf==0.28.0
tensorflow==2.5.0
tensorflow==2.4.1
google-api-python-client==1.8.0
# Needed for compatibility with cirq program protos.
googleapis-common-protos==1.52.0
google-api-core==1.21.0
google-auth==1.18.0
google-api-python-client==1.8.0
grpcio==1.34.1
protobuf==3.13.0

0 comments on commit 7c51d1d

Please sign in to comment.