facebookresearch / SentEval

A python tool for evaluating the quality of sentence embeddings.
Other
2.09k stars 309 forks source link

skipthought example script #27

Closed emanjavacas closed 6 years ago

emanjavacas commented 6 years ago

I am having trouble running this: https://github.com/facebookresearch/SentEval/blob/906b34ae5ffbe17a6970947d5dd5e500ff6daf59/examples/skipthought.py#L51

what version of python actually allows to set attributes of dictionaries like this?

aconneau commented 6 years ago

When passed to the SentEval class as a parameter, the object params_senteval is transformed through the "dotdict" function in senteval/utils.py (https://github.com/facebookresearch/SentEval/blob/master/senteval/utils.py#L42-L46).

Which version of python are you using?

emanjavacas commented 6 years ago

I had seen that dot dict before, but in that skipthought script the line:

params_senteval.encoder = skipthoughts.load_model()

is executed before calling:

se = senteval.engine.SE(params_senteval, batcher, prepare)

So I don't see why it would work...

aconneau commented 6 years ago

Hi, sorry for the late reply and thanks for noticing this. My bad, this was indeed a bug. This has been fixed in ab324e5492a48206e453a1ed816e30356d865320. Were you able to make it work eventually? Thanks, Alexis

aconneau commented 6 years ago

Closing this issue, feel free to re-open if you still have a problem with this! Thanks