salesforce / ctrl

Conditional Transformer Language Model for Controllable Generation

Home Page:https://arxiv.org/abs/1909.05858

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues with pytorch_generation.py when running the Colab exercise

yaw2014 opened this issue · comments

Hi,

I'm running the Colab exercise for pytorch.

When I get to the last code block:
!python2 generation.py --model seqlen256_v1.ckpt/model.ckpt-413000.data-00000-of-00001

I'm getting this error:
/usr/local/lib/python2.7/dist-packages/OpenSSL/crypto.py:14: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release. from cryptography import utils, x509 246534 unique words tcmalloc: large alloc 1262256128 bytes == 0x55fbf8b14000 @ 0x7fde9e790b6b 0x7fde9e7b0379 0x7fde49688b4a 0x7fde4968a5fa 0x7fde4b9ba78a 0x7fde4bc0330b 0x7fde4bc4ab37 0x7fde4b9bb0b0 0x7fde4b9c4d95 0x7fde4bcfe973 0x7fde4bd42709 0x7fde94768c43 0x7fde9453fadb 0x55fbe9bf47ca 0x55fbe9bf1e0a 0x55fbe9c0d6a9 0x55fbe9c25e1e 0x55fbe9c259ca 0x55fbe9be2a6b 0x55fbe9bf9750 0x55fbe9bf1e0a 0x55fbe9bf1879 0x55fbe9c21f5f 0x55fbe9c1d222 0x55fbe9c1cc4d 0x55fbe9bcba86 0x7fde9e3abbf7 0x55fbe9bcb37a Loading vocabulary from vocab ... Read 6086453827 words (246531 unique) from vocabulary file. Loading codes from codes ... Read 200000 codes from the codes file. Could not find PyTorch checkpoint Converting weights and will store the PyTorch checkpoint as 5d11fdadc5aa3b7e75036e3df8c58c2b Traceback (most recent call last): File "pytorch_generation.py", line 114, in <module> reader = pywrap_tensorflow.NewCheckpointReader(chkpt_for_reader) AttributeError: 'module' object has no attribute 'NewCheckpointReader'

Saw a previous filed issue, but this looks like it was resolved for Tensorflow 3.