Skip to content

Commit

Permalink
fix: increase tolerance for sofie-gnn tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjibansg authored and lmoneta committed Sep 6, 2023
1 parent dba14a6 commit 3438580
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions bindings/pyroot/pythonizations/test/sofie_gnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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) :
Expand Down

0 comments on commit 3438580

Please sign in to comment.