googledatalab / datalab

Interactive tools and developer experiences for Big Data on Google Cloud Platform.
Apache License 2.0
975 stars 249 forks source link

Upgrade Tensorflow to 1.12.0 #2117

Open josh-taylr opened 5 years ago

josh-taylr commented 5 years ago

Hello, I see that a similar issue was resolved sometime back when Tensorflow was upgraded to version 1.8.0.

The current version of Tensorflow is 1.12.0 (very soon to be 1.13.0) and as it is a rapidly evolving framework it is now the case that many of example on the official site no longer run in Datalab.

The workaround I am using it to update Tensorflow from inside the container but this is inconvenient as the upgrade is reverted each time the cloud VM is stopped.

josh-taylr commented 5 years ago

I made a couple of realisations about Datalab today that rescope this issue so I will share them here for the benefit of others.

First, I learnt there is a much easier way to upgrade Tensorflow from within notebooks by prefixing a cell with !. E.g. !pip install -U --upgrade-strategy only-if-needed --no-cache-dir tensorflow==1.12.0 tensorflow-gpu==1.12.0

Second, upgrading Tensorflow to version 1.12.0 (or 1.13.1, now that it is available) would likely break some Tensorflow code examples.