rish-16 / gpt2client

✍🏻 gpt2-client: Easy-to-use TensorFlow Wrapper for GPT-2 117M, 345M, 774M, and 1.5B Transformer Models 🤖 📝
MIT License
372 stars 74 forks source link

Asking for tensorflow contrib module #36

Closed jaytimbadia closed 3 years ago

jaytimbadia commented 3 years ago

from gpt2_client import GPT2Client

gpt2 = GPT2Client('345M', save_dir='gptmodel')

gpt2.generate(interactive=True) gpt2.generate(n_samples=4)

text = gpt2.generate(return_text=True) print(text)

Traceback (most recent call last): File "scrape.py", line 1, in from gpt2_client import GPT2Client File "C:\Users\jay.timbadia\black\lib\site-packages\gpt2_client__init__.py", line 1, in from gpt2_client.gpt2_client import GPT2Client File "C:\Users\jay.timbadia\black\lib\site-packages\gpt2_client\gpt2_client.py", line 13, in from tensorflow.contrib.training import HParams ModuleNotFoundError: No module named 'tensorflow.contrib'

I mean all deprendency were satisfied when it got installed right, why needs contrib module then? gpt2-client requires tensorflow 2.3.0 but I dont think it supports contrib?

mc0ps commented 3 years ago

Maybe try: pip uninstall tensorflow pip install tensorflow==1.14.0

rish-16 commented 3 years ago

Hey!

So sorry for the delay in response. gpt2-client only supports TF 1.1X. I haven't had the time to convert it to TF2+. I'm not entirely sure when a possible fix is due. Will definitely keep you in the loop @jaytimbadia!

ansible42 commented 3 years ago

Same error, and 1.14.0 gives me HadoopFileSystem load error.