Closed bhavanadalvi closed 7 years ago
Nice - I think the error you are getting is because numpy is trying to convert your data format into an array when it does assert_array_almost_equal
, but it can't because it isn't square. Instead, just check the two elements individually - eg:
assert_array_almost_equal(train_labels[0], expected_label[0])
assert_array_almost_equal(train_labels[1], expected_label[1])
arghhh.... Thanks Mark for pointing that out, will fix this :P
On Wed, May 17, 2017 at 9:06 AM, Mark Neumann notifications@github.com wrote:
Nice - the error you are getting is because numpy is trying to convert your data format into an array when it does assert_array_almost_equal, but it can't because it isn't square. Instead, just check the two elements individually - eg:
assert_array_almost_equal(train_labels[0], expected_label[0]) assert_array_almost_equal(train_labels[1], expected_label[1])
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/allenai/deep_qa/pull/358#issuecomment-302138942, or mute the thread https://github.com/notifications/unsubscribe-auth/AKc_2WCsY571PzSUMPgR4-oopv6xmVKhks5r6xr-gaJpZM4Nbzy8 .
All test cases are running fine now, and zero pylon errors. Please check if the PR looks fine :-)
I "meant zero pylint errors"
I incorporated all your comments. I could not fix following test-case: test_convert_instance_to_indexed_instance
I can see that both values in line #90 are same, still the following check fails: assert_array_almost_equal(train_labels, expected_label)
Can you please check the code for as_training_data, and test_convert_instance_to_indexed_instance?
===========================================================
tests/data/instances/sequence_tagging/verb_semantics_instance_test.py:90: ValueError