Update test

This commit is contained in:
Matthew Honnibal 2018-05-07 16:59:52 +02:00
parent f6cdafc00e
commit 01c4e13b02

View File

@ -35,8 +35,7 @@ def parser(vocab, arc_eager):
@pytest.fixture
def model(arc_eager, tok2vec):
return Parser.Model(arc_eager.n_moves, token_vector_width=tok2vec.nO,
hist_size=0)[0]
return Parser.Model(arc_eager.n_moves, token_vector_width=tok2vec.nO)[0]
@pytest.fixture
def doc(vocab):
@ -69,11 +68,13 @@ def test_update_doc(parser, model, doc, gold):
parser.update([doc], [gold], sgd=optimize)
@pytest.mark.xfail
def test_predict_doc_beam(parser, model, doc):
parser.model = model
parser(doc, beam_width=32, beam_density=0.001)
@pytest.mark.xfail
def test_update_doc_beam(parser, model, doc, gold):
parser.model = model
def optimize(weights, gradient, key=None):