update tests to use label_smoothing = 0.0

This commit is contained in:
vinit 2023-02-20 17:29:18 +05:30
parent 1507e357dc
commit 344e2d6314
2 changed files with 3 additions and 2 deletions

View File

@ -160,7 +160,7 @@ def test_no_data():
def test_incomplete_data():
# Test that the tagger works with incomplete information
nlp = English()
nlp.add_pipe("tagger")
nlp.add_pipe("tagger", config=dict(label_smoothing=0.0))
train_examples = []
for t in PARTIAL_DATA:
train_examples.append(Example.from_dict(nlp.make_doc(t[0]), t[1]))
@ -180,7 +180,7 @@ def test_incomplete_data():
def test_overfitting_IO():
# Simple test to try and quickly overfit the tagger - ensuring the ML models work correctly
nlp = English()
tagger = nlp.add_pipe("tagger")
tagger = nlp.add_pipe("tagger", config=dict(label_smoothing=0.0))
train_examples = []
for t in TRAIN_DATA:
train_examples.append(Example.from_dict(nlp.make_doc(t[0]), t[1]))

View File

@ -115,6 +115,7 @@ cfg_string = """
[components.tagger]
factory = "tagger"
label_smoothing = 0.0
[components.tagger.model]
@architectures = "spacy.Tagger.v2"