[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1011033: onnx: flaky autopkgtest on armhf: Arrays are not almost equal to 7 decimals



Source: onnx
Version: 1.7.0+dfsg-3
Severity: serious
X-Debbugs-CC: debian-ci@lists.debian.org
User: debian-ci@lists.debian.org
Usertags: flaky

Dear maintainer(s),

I looked at the results of the autopkgtest of you package on armhf because it was showing up as a regression for the upload of gcc-12. I noticed that the test regularly fails, it seems to be restricted to this architecture.

Because the unstable-to-testing migration software now blocks on
regressions in testing, flaky tests, i.e. tests that flip between
passing and failing without changes to the list of installed packages,
are causing people unrelated to your package to spend time on these
tests.

Don't hesitate to reach out if you need help and some more information
from our infrastructure.

Paul

https://ci.debian.net/packages/o/onnx/

https://ci.debian.net/data/autopkgtest/testing/armhf/o/onnx/21152474/log.gz

=================================== FAILURES =================================== _________________ TestOptimizer.test_fuse_bn_into_conv_simple __________________

self = <optimizer_test.TestOptimizer testMethod=test_fuse_bn_into_conv_simple>

    def test_fuse_bn_into_conv_simple(self):  # type: () -> None
for (tensor_type, np_type) in [(TensorProto.FLOAT, np.float32), (TensorProto.DOUBLE, np.float64)]:
            conv = helper.make_node("Conv", ["X", "W", "B"], ["Y"])
            bn = helper.make_node("BatchNormalization", [
                                  "Y", "scale", "b", "mean", "var"], ["Z"])

            W = np.random.randn(3, 2, 5, 5).astype(np_type) + 2
            B = np.random.randn(3,).astype(np_type) + 2
            scale = np.random.randn(3,).astype(np_type) + 2
            b = np.random.randn(3,).astype(np_type) + 2
            mean = np.random.randn(3,).astype(np_type) + 2
            var = np.abs(np.random.randn(3,).astype(np_type)) + 2

            initializers = [
                helper.make_tensor(name, tensor_type,
                                   npa.shape, npa.tobytes(), raw=True)
for name, npa in [('W', W), ('B', B), ('scale', scale), ('b', b), ('mean', mean), ('var', var)]
            ]
            graph = helper.make_graph(
                [conv, bn],
                "test",
[helper.make_tensor_value_info("X", tensor_type, (5, 2, 28, 28)), helper.make_tensor_value_info("W", tensor_type, (3, 2, 5, 5)),
                 helper.make_tensor_value_info("B", tensor_type, (3,)),
                 helper.make_tensor_value_info("scale", tensor_type, (3,)),
                 helper.make_tensor_value_info("b", tensor_type, (3,)),
                 helper.make_tensor_value_info("mean", tensor_type, (3,)),
                 helper.make_tensor_value_info("var", tensor_type, (3,))],
                [helper.make_tensor_value_info(
                    "Z", tensor_type, (5, 3, 24, 24))],
                initializer=initializers,
                value_info=[
                    helper.make_tensor_value_info(
                        "Y", tensor_type, (5, 3, 24, 24))
                ]
            )
            optimized_model = self._optimized(graph, ["fuse_bn_into_conv"])

            self.assertEqual(len(optimized_model.graph.node), 1)
            self.assertEqual(optimized_model.graph.node[0].op_type, 'Conv')
            self.assertEqual(len(optimized_model.graph.initializer), 2)
new_W = numpy_helper.to_array(optimized_model.graph.initializer[0]) new_b = numpy_helper.to_array(optimized_model.graph.initializer[1])

            f = scale / np.sqrt(var + 1e-5)
            np.testing.assert_almost_equal((B - mean) * f + b, new_b)
>           np.testing.assert_almost_equal(
                W * f[:, np.newaxis, np.newaxis, np.newaxis], new_W)
E           AssertionError:
E           Arrays are not almost equal to 7 decimals
E
E           Mismatched elements: 2 / 150 (1.33%)
E           Max absolute difference: 2.3841858e-07
E           Max relative difference: 1.1832779e-07
E x: array([[[[ 1.3602041, 0.6074747, 0.5127016, 1.3461237, 0.3262223], E [ 1.1601448, 1.40072 , 2.0301225, 1.1147949, 1.3020884], E [ 0.6207906, 1.1024365, 1.3334007, 1.5556062, 1.4650011],... E y: array([[[[ 1.3602041, 0.6074747, 0.5127015, 1.3461237, 0.3262222], E [ 1.1601447, 1.40072 , 2.0301223, 1.1147949, 1.3020883], E [ 0.6207906, 1.1024364, 1.3334006, 1.5556061, 1.465001 ],...

onnx/test/optimizer_test.py:1510: AssertionError
=============================== warnings summary ===============================

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


Reply to: