Don't train in any test_save_activations test

This commit is contained in:
Daniël de Kok 2022-08-30 11:19:57 +02:00
parent 699a1877de
commit 6f80e80305
2 changed files with 2 additions and 6 deletions

View File

@ -1212,11 +1212,7 @@ def test_save_activations():
assert "Q2146908" in entity_linker.kb.vocab.strings
# initialize the NEL pipe
optimizer = nlp.initialize(get_examples=lambda: train_examples)
for i in range(2):
losses = {}
nlp.update(train_examples, sgd=optimizer, losses=losses)
nlp.initialize(get_examples=lambda: train_examples)
nO = entity_linker.model.get_dim("nO")

View File

@ -426,7 +426,7 @@ def test_save_activations():
nlp = English()
spancat = nlp.add_pipe("spancat", config={"spans_key": SPAN_KEY})
train_examples = make_examples(nlp)
optimizer = nlp.initialize(get_examples=lambda: train_examples)
nlp.initialize(get_examples=lambda: train_examples)
nO = spancat.model.get_dim("nO")
assert nO == 2
assert set(spancat.labels) == {"LOC", "PERSON"}