Spacy: Changes to msgpack cause models to fail to load

Created on 30 Nov 2018  路  7Comments  路  Source: explosion/spaCy

How to reproduce the behaviour

With release of msgpack 0.6.0 (earlier today) and this specifically:
https://github.com/msgpack/msgpack-python/issues/295

you can't do something like:
nlp = spacy.load('en_core_web_lg')

which gives:

File "msgpack/_unpacker.pyx", line 187, in msgpack._cmsgpack.unpackb
ValueError: 684830 exceeds max_map_len(32768)

which fails here in spacy:

File "vectors.pyx", line 370, in spacy.vectors.Vectors.from_disk.load_key2row

These lines that interact with webpack/webpack-numpy need to be passed non-default values to process larger models. At https://github.com/explosion/spaCy/blob/master/spacy/vectors.pyx#L370 and elsewhere.

OR
you need to restrict webpack to less than 0.6.0 until fixed.

Your Environment

  • Operating System: MacOS, Ubuntu
  • Python Version Used: 3.6.7
  • spaCy Version Used: 2.0.17
  • Environment Information:
feat / serialize third-party 馃敭 thinc

Most helpful comment

Reopening #2995 , as I think it's clearer. tl;dr: Fresh installs should work fine. If you're having problems, you can fix your installation with python -m pip install "msgpack<0.6.0"

All 7 comments

same issue here

I pushed a new version of Thinc pinned to msgpack <0.6.0. I think that should take care of the problem?

Also see #2995!

+1 seeing this as well

spacy.load(u'en_core_web_lg') gives the same error, triggered from within msgpack_numpy.py - I think maybe msgpack needs to be updated in spaCy as well?

Thanks ahead of time as I work around this myself temporarily right now so I can get back to work while waiting for an update.

Reopening #2995 , as I think it's clearer. tl;dr: Fresh installs should work fine. If you're having problems, you can fix your installation with python -m pip install "msgpack<0.6.0"

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nadachaabani1 picture nadachaabani1  路  3Comments

melanietosik picture melanietosik  路  3Comments

norrishd picture norrishd  路  3Comments

bebelbop picture bebelbop  路  3Comments

peterroelants picture peterroelants  路  3Comments