arthurmensch / didyprog

Differentiable Dynamic Programming
MIT License
69 stars 19 forks source link

Unittests are failing #7

Open mortonjt opened 4 years ago

mortonjt commented 4 years ago

The following unittests fail

========================================================================================= short test summary info ==========================================================================================
FAILED test_viterbi.py::test_viterbi_two_lengths[hardmax] - ValueError: too many values to unpack (expected 2)
FAILED test_viterbi.py::test_viterbi_two_lengths[softmax] - ValueError: too many values to unpack (expected 2)
FAILED test_viterbi.py::test_viterbi_two_lengths[sparsemax] - ValueError: too many values to unpack (expected 2)
FAILED test_viterbi.py::test_grad_hessian_viterbi_two_samples[hardmax] - ValueError: too many values to unpack (expected 2)
FAILED test_viterbi.py::test_grad_hessian_viterbi_two_samples[softmax] - ValueError: too many values to unpack (expected 2)
FAILED test_viterbi.py::test_grad_hessian_viterbi_two_samples[sparsemax] - ValueError: too many values to unpack (expected 2)

The culprit is this line of code (the type signature doesn't quite match). https://github.com/arthurmensch/didyprog/blob/master/didyprog/ner/viterbi.py#L276