stellargraph / stellargraph

StellarGraph - Machine Learning on Graphs
https://stellargraph.readthedocs.io/
Apache License 2.0
2.94k stars 430 forks source link

Flaky tests: tests.layer.test_knowledge_graph test_rotate and test_model_rankings[RotatE] #1623

Open kieranricardo opened 4 years ago

kieranricardo commented 4 years ago

test_rotate occasionally fails due to floating point errors, e.g.:

https://buildkite.com/stellar/stellargraph-public/builds/4499

>       np.testing.assert_allclose(prediction[:, 0], actual, rtol=1e-3, atol=1e-14)
E       AssertionError: 
E       Not equal to tolerance rtol=0.001, atol=1e-14
E       
E       Mismatched elements: 1 / 64 (1.56%)
E       Max absolute difference: 4.7683716e-07
E       Max relative difference: 0.00299401
E        x: array([ 8.105036e-01, -6.603727e-01, -1.100341e+00, -1.066008e+00,
E               6.823970e-01,  1.275568e-01, -8.921216e-01, -5.646119e-01,
E               5.654023e-01,  7.939339e-05, -6.256740e-01, -1.239008e+00,...
E        y: array([ 8.105036e-01, -6.603727e-01, -1.100341e+00, -1.066008e+00,
E               6.823970e-01,  1.275568e-01, -8.921216e-01, -5.646119e-01,
E               5.654023e-01,  7.963181e-05, -6.256740e-01, -1.239008e+00,...

tests/layer/test_knowledge_graph.py:210: AssertionError

Also tests.layer.test_knowledge_graph test_model_rankings[RotatE] https://buildkite.com/stellar/stellargraph-public/builds/4683

>           assert raw[1] == expected_raw_mod_s_rank
E           assert 4 == 3

tests/layer/test_knowledge_graph.py:310: AssertionError
huonw commented 4 years ago

More exhaustive lists of recent builds failing in test_rotate and also test_model_rankings[RotatE]: