this-word-does-not-exist icon indicating copy to clipboard operation
this-word-does-not-exist copied to clipboard

Blacklist Pickle Error (Invalid load key)

Open desegura opened this issue 4 years ago • 9 comments

Hi friends,

When executing it in my Anaconda prompt I got this error: image

I tried:

  1. redownloading the blacklist.pickle.gz
  2. try with just "blacklist.pickle"
  3. uncompress it
  4. changing the path of the file
  5. dive in stackoverflow for three days for a solution
  6. using double slashes in the filepath
  7. double slash + different filename

Finally I guess '\x1f' refers to an error reading '\b' in the blacklist_path but I don't really know how to solve it.

Any help please? 😕

desegura avatar Jun 23 '20 22:06 desegura

@desegura what version of Python are you using? For reference, I pickled the file on Python 3.7

turtlesoupy avatar Jun 23 '20 23:06 turtlesoupy

(and for reference, you do need to un-gzip before trying to load it in)

turtlesoupy avatar Jun 23 '20 23:06 turtlesoupy

Hi @turtlesoupy I'm using python 3.7.6 and I already un-gzip the blacklist with GNUWin32 / gzip obtaining a .pickle of 90.310 KB but I get a similar error:

image

I'm on windows 10 v.2004 + every deps installed on my miniconda3 title_maker_pro environment 🤔

desegura avatar Jun 24 '20 10:06 desegura

Even on mac I'm having this issue with the blacklist running Python 3.7 as you mention

image

desegura avatar Jun 24 '20 15:06 desegura

Okay I think I solved it (using the full path of the file) but:

image

Now looks like there is other problem with the configuration_utils.py and huggingface json server

desegura avatar Jun 24 '20 15:06 desegura

@desegura I think this has to do with your network set-up on that machine, I'm able to access that URL without any issue: https://s3.amazonaws.com/models.huggingface.co/bert/gpt2-config.json

turtlesoupy avatar Jun 24 '20 18:06 turtlesoupy

Thank you @turtlesoupy idk why but python is giving me some random errors:

image

Can you please indicate the exact configuration you used to run the scripts?

Thanks!

desegura avatar Jun 27 '20 14:06 desegura

@desegura that error is in the transformers library, it looks like the GPT-2 base model archive it is trying to load is corrupt in some way; perhaps the download was broken?

Anyway, here's a dump of my conda environment: https://gist.github.com/turtlesoupy/aae757ec70f2efd2cc71083255adf4e2. It's running on Ubuntu 20.04 and Python 3.7.6

turtlesoupy avatar Jun 28 '20 20:06 turtlesoupy

@desegura I notice that your forward and inverse models still have .tar suffix. You need to use tar xvzf to unzip the both .tar.gz model files.

yongzx avatar Jul 07 '20 18:07 yongzx