dinghanshen / SWEM

The Tensorflow code for this ACL 2018 paper: "Baseline Needs More Love: On Simple Word-Embedding-Based Models and Associated Pooling Mechanisms"
283 stars 54 forks source link

Package dependency related errors occuring while loading snli_emb.py #10

Closed ashishrana160796 closed 5 years ago

ashishrana160796 commented 5 years ago

While loading the snli_emb.py with current numpy==1.16.* the following error came:

  File "/usr/local/lib/python2.7/dist-packages/numpy/lib/npyio.py", line 451, in load
    raise ValueError("Cannot load file containing pickled data "
ValueError: Cannot load file containing pickled data when allow_pickle=False

When, I downgraded it to numpy==1.14.* the error related to binary compatibility came:

ValueError: numpy.ufunc size changed, may indicate binary incompatibility. Expected 216 from C header, got 192 from PyObject

To me it looks like a package version compatibility related issue with respect to numpy used for creating snli_emb.p pickle file.

It'll be really helpful if you can mention the package versions also that you have used in as your import statements like for gensim, scipy etc packages.

ashishrana160796 commented 5 years ago

It does get resolved with downgrading numpy to 1.14.*. But, along with numpy we need to downgrade these two packages more:

gensim to version 2.3.0 
pyemd to version 0.3.0

It'll be nice to have these dependencies mentioned in README.md to save time future.