facebookresearch / InferSent

InferSent sentence embeddings
Other
2.28k stars 470 forks source link

Where is infersent.pickle? #72

Closed antoinecomp closed 6 years ago

antoinecomp commented 6 years ago

I'm trying to get your sentence embeddings method that provides semantic sentence representations in InterSent/encoder folder but I don't see the infersent.pickle you are referencing.

A friend of mine rather used:

infersent = torch.load('InferSent/encoder/infersent.allnli.pickle', map_location=lambda storage, loc: storage)

But here nothing appears to be named infersent.allnli.pickle neither. Maybe she was referencing an old version ?

aconneau commented 6 years ago

Hi,

we made recent changes to InferSent, and so what you're referring to is indeed the old version. Please pull the new version and follow the README for the new versions of InferSent (which should be simpler to load).

Thanks, Alexis

antoinecomp commented 6 years ago

True !

antoinecomp commented 6 years ago

@aconneau Hi Alexis ! I think this is related: has set_glove_path() function been changed for:

infersent.set_glove_path("InferSent/dataset/GloVe/glove.840B.300d.txt")

Because I have the following error when running it:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-18-1a6368709557> in <module>()
      1 infersent = torch.load('InferSent/encoder/infersent1.pkl', map_location=lambda storage, loc: storage)
----> 2 infersent.set_glove_path("InferSent/dataset/GloVe/glove.840B.300d.txt")
      3 

AttributeError: 'collections.OrderedDict' object has no attribute 'set_glove_path'
Surendra03061975 commented 5 years ago

I am also facing the same issue as mentioned below . Environment details : Anaconda Python 3.6 Windows 10

Please help me with answers which will work on the above environment

I'm trying to get your sentence embeddings method that provides semantic sentence representations in InterSent/encoder folder but I don't see the infersent.pickle you are referencing. A friend of mine rather used: infersent = torch.load('InferSent/encoder/infersent.allnli.pickle', map_location=lambda storage, loc: storage)