google-research/text-to-text-transfer-transformer

(TPU problem?) when using T5 with Google Colab

antonio-mastropaolo opened this issue · 4 comments

Hello everybody, recently I was fine-tuning a model on Colab, and I had no issues doing that.
However, since yesterday I've been getting an error when trying to fine-tune or generate predictions that I didn't manage to fix (the error is reported below)

TypeError: Expected list for 'inputs' argument to 'tpu_replicated_input' Op, not 'shared/embedding'.

Has anyone managed to fix it?

Thank y'all in advance.

Hello everybody, recently I was fine-tuning a model on Colab, and I had no issues doing that. However, since yesterday I've been getting an error when trying to fine-tune or generate predictions that I didn't manage to fix (the error is reported below)

TypeError: Expected list for 'inputs' argument to 'tpu_replicated_input' Op, not 'shared/embedding'.

Has anyone managed to fix it?

Thank y'all in advance.

@antonio-mastropaolo Have you solved this problem? I met the same problem as you mentioned. Do you have any suggestions to solve this?

@upcwanghaibo hello, yep, I did manage to solve it.
Here is the fix.

When installing the dependencies (right after the T5's one), you have to install mesh-tf latest mesh version.
!pip install t5==0.9.3
!pip install git+https://github.com/tensorflow/mesh.git

Then, after all the imports you have in your code write

FLAGS = tf.app.flags.FLAGS
tf.app.flags.DEFINE_string ('f', '', 'kernel')

this fixes for me

@upcwanghaibo hello, yep, I did manage to solve it. Here is the fix.

When installing the dependencies (right after the T5's one), you have to install mesh-tf latest mesh version. !pip install t5==0.9.3 !pip install git+https://github.com/tensorflow/mesh.git

Then, after all the imports you have in your code write

FLAGS = tf.app.flags.FLAGS tf.app.flags.DEFINE_string ('f', '', 'kernel')

this fixes for me

@antonio-mastropaolo Thank you very much for your suggestions, I solved this problem according to your advice. Really appreciate !!!
For the others might meet this problem, this is a really useful action (!pip install git+https://github.com/tensorflow/mesh.git), I just noticed adarob solved this problem in the tensorflow/mesh, he pushed a commit few days ago. So we just need to download the lastest version of mesh and install it.

I just pushed the updated version of mesh, so these workarounds should no-longer be needed.