Get msgpack and msgpack_numpy via Thinc, to avoid potential version conflicts

This commit is contained in:
Matthew Honnibal 2018-03-29 00:14:55 +02:00
parent b5098079d8
commit 8308bbc617
5 changed files with 12 additions and 12 deletions

View File

@ -11,5 +11,3 @@ dill>=0.2,<0.3
regex==2017.4.5 regex==2017.4.5
pytest>=3.0.6,<4.0.0 pytest>=3.0.6,<4.0.0
mock>=2.0.0,<3.0.0 mock>=2.0.0,<3.0.0
msgpack-python==0.5.4
msgpack-numpy==0.4.1

View File

@ -194,9 +194,7 @@ def setup_package():
'pathlib', 'pathlib',
'ujson>=1.35', 'ujson>=1.35',
'dill>=0.2,<0.3', 'dill>=0.2,<0.3',
'regex==2017.4.5', 'regex==2017.4.5'],
'msgpack-python==0.5.4',
'msgpack-numpy==0.4.1'],
classifiers=[ classifiers=[
'Development Status :: 5 - Production/Stable', 'Development Status :: 5 - Production/Stable',
'Environment :: Console', 'Environment :: Console',

View File

@ -8,7 +8,9 @@ cimport numpy as np
import cytoolz import cytoolz
from collections import OrderedDict from collections import OrderedDict
import ujson import ujson
import msgpack
from .util import msgpack
from .util import msgpack_numpy
from thinc.api import chain from thinc.api import chain
from thinc.v2v import Affine, SELU, Softmax from thinc.v2v import Affine, SELU, Softmax

View File

@ -23,9 +23,10 @@ from .symbols import ORTH
from .compat import cupy, CudaStream, path2str, basestring_, input_, unicode_ from .compat import cupy, CudaStream, path2str, basestring_, input_, unicode_
from .compat import import_file from .compat import import_file
import msgpack # Import these directly from Thinc, so that we're sure we always have the
import msgpack_numpy # same version.
msgpack_numpy.patch() from thinc.neural._classes.model import msgpack
from thinc.neural._classes.model import msgpack_numpy
LANGUAGES = {} LANGUAGES = {}

View File

@ -3,9 +3,10 @@ from __future__ import unicode_literals
import numpy import numpy
from collections import OrderedDict from collections import OrderedDict
import msgpack
import msgpack_numpy from .util import msgpack
msgpack_numpy.patch() from .util import msgpack_numpy
cimport numpy as np cimport numpy as np
from thinc.neural.util import get_array_module from thinc.neural.util import get_array_module
from thinc.neural._classes.model import Model from thinc.neural._classes.model import Model