facebookresearch / InferSent

InferSent sentence embeddings
Other
2.28k stars 471 forks source link

Model is no longer available in SW3 amazon bucket #108

Closed nstfk closed 5 years ago

nstfk commented 5 years ago

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, '<'.``

lolz0r commented 5 years ago

This is because the model file ( https://s3.amazonaws.com/senteval/infersent/infersent2.pkl ) seems to no longer exist. (?)

nstfk commented 5 years ago

hmm, any idea why?

lolz0r commented 5 years ago

I don't know why; I have the same problem! (Looking for a valid copy of infersent2.pkl)

nstfk commented 5 years ago

Can anyone with a local copy share it please

nstfk commented 5 years ago

@aconneau any insights on the issue or when will the model be back ?

habichta commented 5 years ago

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

nstfk commented 5 years ago

Great, thank you @habichta

maxlund commented 5 years ago

Oh man, kinda sucks having to download a random pickled file from google drive and just hoping it isn't malicious :/

saippuakauppias commented 5 years ago

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