Skip to content

Investigate Failed Test in test_stump.py #1160

Description

@seanlaw
STUMPY_SEED=2633420849 NUMBA_DISABLE_JIT=1 NUMBA_ENABLE_CUDASIM=1 pixi run tests custom tests/test_stump.py

This test is failing here

It would be good to understand why this is happening.

For some reason the naive way of computing the matrix profile is different from the performant way.

tests\test_stump.py ........F....................                        [100%]

================================== FAILURES ===================================
_________________ test_stump_identical_subsequence_self_join __________________

    def test_stump_identical_subsequence_self_join():
        identical = rng.RNG.rand(8)
        T_A = rng.RNG.rand(20)
        T_A[1 : 1 + identical.shape[0]] = identical
        T_A[11 : 11 + identical.shape[0]] = identical
        m = 3
        zone = int(np.ceil(m / 4))
        ref_mp = naive.stump(T_A, m, exclusion_zone=zone, row_wise=True)
        comp_mp = stump(T_A, m, ignore_trivial=True)
        naive.replace_inf(ref_mp)
        naive.replace_inf(comp_mp)
>       npt.assert_almost_equal(
            ref_mp[:, 0], comp_mp[:, 0], decimal=config.STUMPY_TEST_PRECISION
        )  # ignore indices
E       AssertionError: 
E       Arrays are not almost equal to 5 decimals
E       
E       Mismatched elements: 2 / 18 (11.1%)
E       Mismatch at indices:
E        [6]: 0.0 (ACTUAL), 0.00010158705418291471 (DESIRED)
E        [16]: 0.0 (ACTUAL), 0.00010158705418291471 (DESIRED)
E       Max absolute difference among violations: 0.00010158705418291471
E       Max relative difference among violations: 1.0
E        ACTUAL: array([0.0594865428667342, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
E              0.14405632436990226, 0.0905990067980011, 0.07801877452945057,
E              0.0594865428667342, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
E              0.07801877452945057], dtype=object)
E        DESIRED: mparray([0.0594865428667375, 1.0323827311807139e-07, 0.0, 0.0, 0.0, 0.0,
E                0.00010158705418291471, 0.14405632436989182, 0.09059900679799732,
E                0.07801877452944932, 0.0594865428667375, 1.0323827311807139e-07,...

tests\test_stump.py:146: AssertionError
======================== 1 failed, 28 passed in 6.51s =========================
Error: Test execution encountered exit code 1
Error: Process completed with exit code 1.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions