From ee4733b48cd43300f55c038954f0d16d11569954 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Mon, 3 Dec 2018 02:10:37 +0100 Subject: [PATCH 1/2] Update srsly version pin --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index d68ac7a31..cdab5aace 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,7 +11,7 @@ regex==2018.01.10 requests>=2.13.0,<3.0.0 jsonschema>=2.6.0,<3.0.0 wasabi>=0.0.8,<1.1.0 -srsly>=0.0.4,<1.1.0 +srsly>=0.0.5,<1.1.0 pathlib==1.0.1; python_version < "3.4" # Development dependencies cython>=0.25 diff --git a/setup.py b/setup.py index 99ae655bb..0f4b501a4 100755 --- a/setup.py +++ b/setup.py @@ -208,7 +208,7 @@ def setup_package(): "requests>=2.13.0,<3.0.0", "jsonschema>=2.6.0,<3.0.0", "wasabi>=0.0.8,<1.1.0", - "srsly>=0.0.4,<1.1.0", + "srsly>=0.0.5,<1.1.0", 'pathlib==1.0.1; python_version < "3.4"', ], setup_requires=["wheel"], From 5b2741f75133a8d2299f37091f4fd3e17539b01f Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Mon, 3 Dec 2018 02:12:07 +0100 Subject: [PATCH 2/2] Remove unused cytoolz / itertools imports --- examples/training/conllu.py | 1 - spacy/cli/converters/iob2json.py | 4 ++-- spacy/cli/ud/ud_run_test.py | 1 - spacy/cli/ud/ud_train.py | 1 - spacy/gold.pyx | 2 -- spacy/syntax/_parser_model.pyx | 1 - 6 files changed, 2 insertions(+), 8 deletions(-) diff --git a/examples/training/conllu.py b/examples/training/conllu.py index f949a8156..a7745b93a 100644 --- a/examples/training/conllu.py +++ b/examples/training/conllu.py @@ -22,7 +22,6 @@ from spacy.matcher import Matcher import itertools import random import numpy.random -import cytoolz import conll17_ud_eval diff --git a/spacy/cli/converters/iob2json.py b/spacy/cli/converters/iob2json.py index 24e78989b..35dc29bb3 100644 --- a/spacy/cli/converters/iob2json.py +++ b/spacy/cli/converters/iob2json.py @@ -1,7 +1,7 @@ # coding: utf8 from __future__ import unicode_literals -from cytoolz import partition_all +import cytoolz from ...gold import iob_to_biluo @@ -11,7 +11,7 @@ def iob2json(input_data, n_sents=10, *args, **kwargs): Convert IOB files into JSON format for use with train cli. """ docs = [] - for group in partition_all(n_sents, docs): + for group in cytoolz.partition_all(n_sents, docs): group = list(group) first = group.pop(0) to_extend = first["paragraphs"][0]["sentences"] diff --git a/spacy/cli/ud/ud_run_test.py b/spacy/cli/ud/ud_run_test.py index e3771fa92..43140eb03 100644 --- a/spacy/cli/ud/ud_run_test.py +++ b/spacy/cli/ud/ud_run_test.py @@ -30,7 +30,6 @@ Fused_inside = None import itertools import random import numpy.random -import cytoolz from . import conll17_ud_eval diff --git a/spacy/cli/ud/ud_train.py b/spacy/cli/ud/ud_train.py index 746607be0..6c4fbb3eb 100644 --- a/spacy/cli/ud/ud_train.py +++ b/spacy/cli/ud/ud_train.py @@ -25,7 +25,6 @@ from timeit import default_timer as timer import itertools import random import numpy.random -import cytoolz from . import conll17_ud_eval diff --git a/spacy/gold.pyx b/spacy/gold.pyx index 9c0c00652..8bdd42a83 100644 --- a/spacy/gold.pyx +++ b/spacy/gold.pyx @@ -4,8 +4,6 @@ from __future__ import unicode_literals, print_function import re import random -import cytoolz -import itertools import numpy import tempfile import shutil diff --git a/spacy/syntax/_parser_model.pyx b/spacy/syntax/_parser_model.pyx index 9796193f6..f60354be8 100644 --- a/spacy/syntax/_parser_model.pyx +++ b/spacy/syntax/_parser_model.pyx @@ -7,7 +7,6 @@ from __future__ import unicode_literals, print_function from collections import OrderedDict import numpy cimport cython.parallel -import cytoolz import numpy.random cimport numpy as np from libc.math cimport exp