From 0f3b23420b3d59b2ed696e6c4563d6dde893538e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danie=CC=88l=20de=20Kok?= Date: Wed, 22 Feb 2023 08:42:25 +0100 Subject: [PATCH] Also test max cuts with NER overfitting --- spacy/tests/parser/test_ner.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spacy/tests/parser/test_ner.py b/spacy/tests/parser/test_ner.py index 62b8f9704..8d46b57d5 100644 --- a/spacy/tests/parser/test_ner.py +++ b/spacy/tests/parser/test_ner.py @@ -540,11 +540,13 @@ def test_block_ner(): assert [token.ent_type_ for token in doc] == expected_types -def test_overfitting_IO(): +@pytest.mark.parametrize("max_moves", [0, 1, 5, 100]) +def test_overfitting_IO(max_moves): fix_random_seed(1) # Simple test to try and quickly overfit the NER component nlp = English() ner = nlp.add_pipe("ner", config={"model": {}}) + ner.cfg["update_with_oracle_cut_size"] = max_moves train_examples = [] for text, annotations in TRAIN_DATA: train_examples.append(Example.from_dict(nlp.make_doc(text), annotations))