Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tslearn/tests/test_metrics.py::test_masks fails #527

Open
gkoundry opened this issue Nov 12, 2024 · 0 comments
Open

tslearn/tests/test_metrics.py::test_masks fails #527

gkoundry opened this issue Nov 12, 2024 · 0 comments
Labels

Comments

@gkoundry
Copy link

Describe the bug
tslearn/tests/test_metrics.py::test_masks fails

To Reproduce

git clone [email protected]:tslearn-team/tslearn.git
cd tslearn/
pip install -r requirements.txt
pip install pytest
pytest tslearn/tests/test_metrics.py

Expected behavior
All tests pass

Actual Behavior

>               np.testing.assert_allclose(
                    estimator1.fit(time_series).labels_, estimator2.fit(time_series).labels_
                )

tslearn/tests/test_metrics.py:436: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (<function assert_allclose.<locals>.compare at 0x7fb66f7749d0>, array([0, 2, 1, 2, 2, 2, 1, 2, 0, 1, 2, 1, 0, 2, 2]), array([1, 0, 0, 1, 1, 0, 2, 1, 0, 2, 0, 2, 0, 1, 1]))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0', 'strict': False, ...}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
E           AssertionError: 
E           Not equal to tolerance rtol=1e-07, atol=0
E           
E           Mismatched elements: 13 / 15 (86.7%)
E           Max absolute difference among violations: 2
E           Max relative difference among violations: 1.
E            ACTUAL: array([0, 2, 1, 2, 2, 2, 1, 2, 0, 1, 2, 1, 0, 2, 2])
E            DESIRED: array([1, 0, 0, 1, 1, 0, 2, 1, 0, 2, 0, 2, 0, 1, 1])

Environment (please complete the following information):

  • OS:Ubuntu 20
  • Python 3.10
  • tslearn version lastest master

Additional context
N/A

@gkoundry gkoundry added the bug label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant