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

Error from gpt2_client import GPT2Client #14

Closed Igor-Shabalin closed 4 years ago

Igor-Shabalin commented 4 years ago

Describe the bug I get an import error module 'tensorflow.python.util.compat' has no attribute 'v1'

To Reproduce Steps to reproduce the behavior:

  1. Imported gpt2_client

from gpt2_client import GPT2Client Traceback (most recent call last): File "", line 1, in File "/home/pi/proba/test/lib/python3.6/site-packages/gpt2_client/init.py", line 1, in from gpt2_client.gpt2_client import GPT2Client File "/home/pi/proba/test/lib/python3.6/site-packages/gpt2_client/gpt2_client.py", line 15, in import gpt_2_simple as gpt2 File "/home/pi/proba/test/lib/python3.6/site-packages/gpt_2_simple/init.py", line 1, in from .gpt_2 import * File "/home/pi/proba/test/lib/python3.6/site-packages/gpt_2_simple/gpt_2.py", line 23, in from gpt_2_simple.src import model, sample, encoder, memory_saving_gradients File "/home/pi/proba/test/lib/python3.6/site-packages/gpt_2_simple/src/memory_saving_gradients.py", line 13, in setattr(tf.compat.v1.GraphKeys, "VARIABLES", "variables") AttributeError: module 'tensorflow.python.util.compat' has no attribute 'v1'

Desktop (please complete the following information):

Additional context I use Tensorflow 1.5 because other versions do not work with my processors Intel Xeon X5675

rish-16 commented 4 years ago

Hello there,

Let me look into it asap. Usually, with other OSs and TF versions, the installation isn't much of a hassle. Do sit tight; I'll get back to you on this. Thank you for your patience :)

Igor-Shabalin commented 4 years ago

Good afternoon. I build version 1.14 for my processor without AVX. Now everything works as it should. Thank you, the problem is no longer relevant.

rish-16 commented 4 years ago

Cheers!