rish-16/gpt2client

Error from gpt2_client import GPT2Client

Igor-Shabalin opened this issue · 3 comments

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):

  • OS: Ubuntu 18.04

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

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 :)

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.

Cheers!