From 3438580293b8e46a7581a574d347e340af21346e Mon Sep 17 00:00:00 2001 From: Sanjiban Sengupta Date: Wed, 6 Sep 2023 01:32:15 +0530 Subject: [PATCH] fix: increase tolerance for sofie-gnn tests --- .../pyroot/pythonizations/test/sofie_gnn.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bindings/pyroot/pythonizations/test/sofie_gnn.py b/bindings/pyroot/pythonizations/test/sofie_gnn.py index ae2bc41127bc8..b57f30e274905 100644 --- a/bindings/pyroot/pythonizations/test/sofie_gnn.py +++ b/bindings/pyroot/pythonizations/test/sofie_gnn.py @@ -155,9 +155,9 @@ def test_a_parse_gnn(self): output_edge_data = output.edges.numpy() output_global_data = output.globals.numpy().flatten() - assert_almost_equal(output_node_data, np.asarray(input_data.node_data)) - assert_almost_equal(output_edge_data, np.asarray(input_data.edge_data)) - assert_almost_equal(output_global_data, np.asarray(input_data.global_data)) + assert_almost_equal(output_node_data, np.asarray(input_data.node_data), 5) + assert_almost_equal(output_edge_data, np.asarray(input_data.edge_data), 5) + assert_almost_equal(output_global_data, np.asarray(input_data.global_data), 5) def test_b_parse_graph_independent(self): @@ -198,9 +198,9 @@ def test_b_parse_graph_independent(self): output_edge_data = output.edges.numpy() output_global_data = output.globals.numpy().flatten() - assert_almost_equal(output_node_data, np.asarray(input_data.node_data)) - assert_almost_equal(output_edge_data, np.asarray(input_data.edge_data)) - assert_almost_equal(output_global_data, np.asarray(input_data.global_data)) + assert_almost_equal(output_node_data, np.asarray(input_data.node_data), 5) + assert_almost_equal(output_edge_data, np.asarray(input_data.edge_data), 5) + assert_almost_equal(output_global_data, np.asarray(input_data.global_data), 5) def test_c_lhcb_toy_inference(self): @@ -293,11 +293,11 @@ def test_c_lhcb_toy_inference(self): output_edge_data = output_gn[i].edges.numpy() output_global_data = output_gn[i].globals.numpy().flatten() - assert_almost_equal(output_node_data, np.asarray(output_ops[i].node_data)) + assert_almost_equal(output_node_data, np.asarray(output_ops[i].node_data), 5) - assert_almost_equal(output_edge_data, np.asarray(output_ops[i].edge_data)) + assert_almost_equal(output_edge_data, np.asarray(output_ops[i].edge_data), 5) - assert_almost_equal(output_global_data, np.asarray(output_ops[i].global_data)) + assert_almost_equal(output_global_data, np.asarray(output_ops[i].global_data), 5) @classmethod def tearDownClass(self) :