Skip to content

Commit

Permalink
Update Sonnet version to 2.0.0.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 303292840
Change-Id: I0118990892ac9c369c94de966a092f5056d1eafd
  • Loading branch information
tomhennigan authored and sonnet-copybara committed Mar 27, 2020
1 parent bb53c63 commit 940b4d1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ To get started install TensorFlow 2.0 and Sonnet 2:

```shell
$ pip install tensorflow-gpu tensorflow-probability
$ pip install "dm-sonnet>=2.0.0b0" --pre
$ pip install dm-sonnet
```

You can run the following to verify things installed correctly:
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Installation
Install Sonnet by running::

$ pip install tensorflow-gpu
$ pip install "dm-sonnet>=2.0.0b0" --pre
$ pip install dm-sonnet

.. toctree::
:caption: Guides
Expand Down
2 changes: 1 addition & 1 deletion sonnet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
"static_unroll",
)

__version__ = "2.0.0b0"
__version__ = "2.0.0"

# ________________________________________
# / Please don't use symbols in `src` they \
Expand Down
3 changes: 3 additions & 0 deletions sonnet/src/optimizers/optimizer_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ def testInconsistentDTypes(self):

def testUnsuppportedStrategyError(self):
strategy = tf.distribute.MirroredStrategy()
if not hasattr(strategy, "run"):
# TODO(tomhennigan) Remove this once we test with TF 2.2.
strategy.run = strategy.experimental_run_v2
with strategy.scope():
parameters = [tf.Variable(1.0)]
updates = [tf.constant(0.1)]
Expand Down

0 comments on commit 940b4d1

Please sign in to comment.