From 5fa3235d0604a7a73a0601c67a6a89ca721b2757 Mon Sep 17 00:00:00 2001 From: svlandeg Date: Fri, 31 Jul 2020 14:19:10 +0200 Subject: [PATCH] set DATA_VALIDATION to False for debug_model (upgrade thinc) --- pyproject.toml | 2 +- requirements.txt | 2 +- setup.cfg | 4 ++-- spacy/cli/debug_model.py | 4 +++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 91f1464df..5989889d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ requires = [ "cymem>=2.0.2,<2.1.0", "preshed>=3.0.2,<3.1.0", "murmurhash>=0.28.0,<1.1.0", - "thinc>=8.0.0a19,<8.0.0a30", + "thinc>=8.0.0a21,<8.0.0a30", "blis>=0.4.0,<0.5.0", "pytokenizations", "smart_open>=2.0.0,<3.0.0" diff --git a/requirements.txt b/requirements.txt index d0413825b..ee892b393 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ # Our libraries cymem>=2.0.2,<2.1.0 preshed>=3.0.2,<3.1.0 -thinc>=8.0.0a19,<8.0.0a30 +thinc>=8.0.0a21,<8.0.0a30 blis>=0.4.0,<0.5.0 ml_datasets>=0.1.1 murmurhash>=0.28.0,<1.1.0 diff --git a/setup.cfg b/setup.cfg index d2cb7c92a..f8f4561bf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -34,13 +34,13 @@ setup_requires = cymem>=2.0.2,<2.1.0 preshed>=3.0.2,<3.1.0 murmurhash>=0.28.0,<1.1.0 - thinc>=8.0.0a19,<8.0.0a30 + thinc>=8.0.0a21,<8.0.0a30 install_requires = # Our libraries murmurhash>=0.28.0,<1.1.0 cymem>=2.0.2,<2.1.0 preshed>=3.0.2,<3.1.0 - thinc>=8.0.0a19,<8.0.0a30 + thinc>=8.0.0a21,<8.0.0a30 blis>=0.4.0,<0.5.0 wasabi>=0.7.1,<1.1.0 srsly>=2.1.0,<3.0.0 diff --git a/spacy/cli/debug_model.py b/spacy/cli/debug_model.py index 0aea38e5c..8c0726cc3 100644 --- a/spacy/cli/debug_model.py +++ b/spacy/cli/debug_model.py @@ -2,7 +2,7 @@ from typing import Dict, Any, Optional from pathlib import Path from wasabi import msg from thinc.api import require_gpu, fix_random_seed, set_dropout_rate, Adam, Config -from thinc.api import Model +from thinc.api import Model, DATA_VALIDATION import typer from ._util import Arg, Opt, debug_cli, show_validation_error, parse_config_overrides @@ -90,7 +90,9 @@ def debug_model(model: Model, *, print_settings: Optional[Dict[str, Any]] = None # STEP 1: Initializing the model and printing again Y = _get_output(model.ops.xp) _set_output_dim(nO=Y.shape[-1], model=model) + DATA_VALIDATION.set(False) # The output vector might differ from the official type of the output layer model.initialize(X=_get_docs(), Y=Y) + DATA_VALIDATION.set(True) if print_settings.get("print_after_init"): msg.info(f"After initialization:") _print_model(model, print_settings)