Skip to content

Commit 940b4d1

Browse files
tomhennigansonnet-copybara
authored andcommitted
Update Sonnet version to 2.0.0.
PiperOrigin-RevId: 303292840 Change-Id: I0118990892ac9c369c94de966a092f5056d1eafd
1 parent bb53c63 commit 940b4d1

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ To get started install TensorFlow 2.0 and Sonnet 2:
5252

5353
```shell
5454
$ pip install tensorflow-gpu tensorflow-probability
55-
$ pip install "dm-sonnet>=2.0.0b0" --pre
55+
$ pip install dm-sonnet
5656
```
5757

5858
You can run the following to verify things installed correctly:

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Installation
2020
Install Sonnet by running::
2121

2222
$ pip install tensorflow-gpu
23-
$ pip install "dm-sonnet>=2.0.0b0" --pre
23+
$ pip install dm-sonnet
2424

2525
.. toctree::
2626
:caption: Guides

sonnet/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
"static_unroll",
150150
)
151151

152-
__version__ = "2.0.0b0"
152+
__version__ = "2.0.0"
153153

154154
# ________________________________________
155155
# / Please don't use symbols in `src` they \

sonnet/src/optimizers/optimizer_tests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ def testInconsistentDTypes(self):
105105

106106
def testUnsuppportedStrategyError(self):
107107
strategy = tf.distribute.MirroredStrategy()
108+
if not hasattr(strategy, "run"):
109+
# TODO(tomhennigan) Remove this once we test with TF 2.2.
110+
strategy.run = strategy.experimental_run_v2
108111
with strategy.scope():
109112
parameters = [tf.Variable(1.0)]
110113
updates = [tf.constant(0.1)]

0 commit comments

Comments
 (0)