From 9520489225bc631401d509f03aa8a47722a95931 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Thu, 6 Dec 2018 18:46:09 +0100 Subject: [PATCH] Fix removabl of dill (for srsly) --- spacy/tokens/doc.pyx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spacy/tokens/doc.pyx b/spacy/tokens/doc.pyx index cd2428d79..42ecb5644 100644 --- a/spacy/tokens/doc.pyx +++ b/spacy/tokens/doc.pyx @@ -9,7 +9,7 @@ cimport numpy as np import numpy import numpy.linalg import struct -import dill +import srsly from thinc.neural.util import get_array_module, copy_array import srsly @@ -1061,11 +1061,11 @@ def pickle_doc(doc): bytes_data = doc.to_bytes(vocab=False, user_data=False) hooks_and_data = (doc.user_data, doc.user_hooks, doc.user_span_hooks, doc.user_token_hooks) - return (unpickle_doc, (doc.vocab, dill.dumps(hooks_and_data), bytes_data)) + return (unpickle_doc, (doc.vocab, srsly.pickle_dumps(hooks_and_data), bytes_data)) def unpickle_doc(vocab, hooks_and_data, bytes_data): - user_data, doc_hooks, span_hooks, token_hooks = dill.loads(hooks_and_data) + user_data, doc_hooks, span_hooks, token_hooks = srsly.pickle_loads(hooks_and_data) doc = Doc(vocab, user_data=user_data).from_bytes(bytes_data, exclude='user_data')