I had a working code that simply loads the infersent model. Now, it wont unpickle the model
MODEL_PATH = "./encoder/infersent1.pkl"
params_model = {'bsize': 64, 'word_emb_dim': 300, 'enc_lstm_dim': 2048,
'pool_type': 'max', 'dpout_model': 0.0, 'version':
model_version}
inferSent = InferSent(params_model)
print(MODEL_PATH)
inferSent.load_state_dict(torch.load(MODEL_PATH))
use_cuda = False
inferSent = inferSent.cuda() if use_cuda else inferSent
# If infersent1 -> use GloVe embeddings. If infersent2 -> use InferSent
embeddings.
W2V_PATH = './dataset/GloVe/glove.840B.300d.txt' if model_version == 1 else
'../dataset/fastText/crawl-300d-2M.vec'
inferSent.set_w2v_path(W2V_PATH)
It results in error
UnpicklingError: invalid load key, '<'.``
This is because the model file ( https://s3.amazonaws.com/senteval/infersent/infersent2.pkl ) seems to no longer exist. (?)
hmm, any idea why?
I don't know why; I have the same problem! (Looking for a valid copy of infersent2.pkl)
Can anyone with a local copy share it please
@aconneau any insights on the issue or when will the model be back ?
Great, thank you @habichta
Oh man, kinda sucks having to download a random pickled file from google drive and just hoping it isn't malicious :/
Hope that helps ...
https://drive.google.com/file/d/1pRbvodca415gtrbMJf8EqBf--wOmu9Lf/view?usp=sharing
https://drive.google.com/file/d/1sfIlbc8C5k_CujTF7UrtW_2lvNIH-EhW/view?usp=sharing
@habichta , sorry, but models are the same.
Please, check issue #123
Most helpful comment
Can anyone with a local copy share it please