Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

textgenrnn() not working in Google Colab without "%tensorflow_version 1.x" #178

Closed
Defender373 opened this issue Mar 31, 2020 · 5 comments
Closed

Comments

@Defender373
Copy link

Defender373 commented Mar 31, 2020

Hello! I was using textgenrnn(name=model_name) on a google colab a few weeks ago to train a model and at the time it worked perfectly. Today I repeated the same correct steps I took before, but it gave me this error (see picture). If you need more details feel free to let me know.

link to the google colab: https://colab.research.google.com/drive/1nNB-uNfBKmCOpaOY9owgSFKgMxl2qCmZ#scrollTo=P8wSlgXoDPCR

image

@Picardian14
Copy link

I am also using Google Collab trying to train a fresh new model and got the same error. I tried removing the name attribute but it does not help. What confuses me is that placeholder attribute is from Tensorflow 1.x and being textgenrnn for tensorflow > 2.1 i don't understand why it is using that attribute. Running it without Collab does not have the same problem, but overheats my cpu

@Defender373 Defender373 changed the title textgenrnn(name=model_name) no longer working textgenrnn() no longer working in Google Colab Apr 1, 2020
@Defender373
Copy link
Author

I tried testing textgenrnn in Google Colab and here was the result.

image

@Defender373 Defender373 changed the title textgenrnn() no longer working in Google Colab textgenrnn() not working in Google Colab without "%tensorflow_version 1.x" Apr 1, 2020
@Defender373
Copy link
Author

I am also using Google Collab trying to train a fresh new model and got the same error. I tried removing the name attribute but it does not help. What confuses me is that placeholder attribute is from Tensorflow 1.x and being textgenrnn for tensorflow > 2.1 i don't understand why it is using that attribute. Running it without Collab does not have the same problem, but overheats my cpu

So after reading the note in the picture I posted here, it turns out if we put "%tensorflow_version 1.0x" before we run "import tensorflow", textgenrnn should work in google colab.

image

@minimaxir
Copy link
Owner

I have just updated the notebook with the 1.X magic. (the reason it's necessary is because Google Colab contains an outdated textgenrnn version which does not support 2.0, to my annoyance.)

@RobertLowe
Copy link

RobertLowe commented Aug 16, 2021

@minimaxir colab broke again?

1.x :

Screen Shot 2021-08-16 at 10 30 59 AM

2.x :

Screen Shot 2021-08-16 at 10 31 58 AM

Looks like some dependencies shifted around and colab was not updated :(


Found a partial solution, if you do:

pip3 install git+git://github.com/minimaxir/textgenrnn.git#v1.5.0 instead of pip3 install git+git://github.com/minimaxir/textgenrnn.git

The notebook will run as expected, but run on an older version. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants