mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-04 06:16:33 +03:00
Don't train in any test_save_activations test
This commit is contained in:
parent
699a1877de
commit
6f80e80305
|
@ -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")
|
||||
|
||||
|
|
|
@ -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"}
|
||||
|
|
Loading…
Reference in New Issue
Block a user