Practical_RL icon indicating copy to clipboard operation
Practical_RL copied to clipboard

coursera/week6/seq2seq/basic_model_tf.py hangs with TF 1.14.0

Open dniku opened this issue 6 years ago • 3 comments

https://www.coursera.org/learn/practical-rl/discussions/all/threads/b4Bm1b6OEemlhhJkLrq7mA reports that the honor track assignment hangs on Colab with the current TF version (1.14.0), but works with an old one (1.6.0). I have successfully reproduced the issue.

The culprit is somewhere in basic_model_tf.py, which is also present almost unmodified in master (week07_seq2seq). Most likely, we haven't noticed that because no one has attempted that week with TF instead of PyTorch. In any case, this must be fixed one way (finding the cause of the issue) or another (getting rid of TF in master and coursera).

It seems that the issue is caused by the invocation of dynamic_rnn, which hangs (I've added a couple of debug prints and the last one that fired was the one before the call to that function). dynamic_rnn is deprecated; this SO thread is probably relevant for migration: https://stackoverflow.com/questions/54989442/rnn-in-tensorflow-vs-keras-depreciation-of-tf-nn-dynamic-rnn

dniku avatar Aug 23 '19 23:08 dniku

I have verified that it works with the current version of the justheuristic/practical_rl Docker image, which contains Tensorflow 1.13.1.

dniku avatar Sep 15 '19 17:09 dniku

Confirmed that !pip install tensorflow-gpu==1.13.1 instead of %tensorflow_version 1.x in the Colab init cell fixes the issue in Colab.

dniku avatar Apr 24 '20 13:04 dniku

It still doesn't work, although we're now installing an old version in Colab.

dniku avatar May 15 '20 19:05 dniku