Skip to content

⚠️ CI failed on Linux.pylatest_pip_openblas_pandas ⚠️ #27967

Closed

Description

@scikit-learn-bot

CI is still failing on Linux.pylatest_pip_openblas_pandas (Feb 20, 2024)

  • test_minibatch_sensible_reassign[34]

Activity

  1. added
    Needs Triage
    on Dec 16, 2023
  2. scikit-learn-bot commented on Dec 17, 2023

    @scikit-learn-bot
    ContributorAuthor

    CI is no longer failing! ✅

    Successful run on Jun 20, 2024

  3. thomasjpfan commented on Dec 20, 2023

    @thomasjpfan
    Member

    For record keeping, this looks like a random seed that failed:

    global_random_seed = 34
    
        def test_minibatch_sensible_reassign(global_random_seed):
            # check that identical initial clusters are reassigned
            # also a regression test for when there are more desired reassignments than
            # samples.
            zeroed_X, true_labels = make_blobs(
                n_samples=100, centers=5, random_state=global_random_seed
            )
            zeroed_X[::2, :] = 0
        
            km = MiniBatchKMeans(
                n_clusters=20, batch_size=10, random_state=global_random_seed, init="random"
            ).fit(zeroed_X)
            # there should not be too many exact zero cluster centers
    >       assert km.cluster_centers_.any(axis=1).sum() > 10
    E       AssertionError: assert 10 > 10
    E        +  where 10 = <built-in method sum of numpy.ndarray object at 0x7f00eaaf0c90>()
    E        +    where <built-in method sum of numpy.ndarray object at 0x7f00eaaf0c90> = array([ True, False,  True,  True, False, False, False,  True,  True,\n        True, False, False,  True, False, False, False, False,  True,\n        True,  True]).sum
    E        +      where array([ True, False,  True,  True, False, False, False,  True,  True,\n        True, False, False,  True, False, False, False, False,  True,\n        True,  True]) = <built-in method any of numpy.ndarray object at 0x7f00eaae8390>(axis=1)
    E        +        where <built-in method any of numpy.ndarray object at 0x7f00eaae8390> = array([[ -0.08411287,  -1.35341192],\n       [  0.        ,   0.        ],\n       [-10.04085907,  10.04083876],\n       ...     ],\n       [ -9.1038364 ,   6.86739558],\n       [ -9.66539459,   5.01011406],\n       [ -6.894048  ,  -1.75933572]]).any
    E        +          where array([[ -0.08411287,  -1.35341192],\n       [  0.        ,   0.        ],\n       [-10.04085907,  10.04083876],\n       ...     ],\n       [ -9.1038364 ,   6.86739558],\n       [ -9.66539459,   5.01011406],\n       [ -6.894048  ,  -1.75933572]]) = MiniBatchKMeans(batch_size=10, init='random', n_clusters=20, random_state=34).cluster_centers_
    
    global_random_seed = 34
    km         = MiniBatchKMeans(batch_size=10, init='random', n_clusters=20, random_state=34)
    true_labels = array([3, 0, 2, 4, 1, 0, 2, 3, 0, 1, 4, 2, 2, 0, 2, 4, 3, 4, 2, 3, 3, 4,
           2, 2, 1, 4, 3, 4, 3, 1, 1, 1, 4, 1, 4,...3,
           4, 1, 0, 3, 3, 4, 3, 2, 2, 2, 0, 2, 2, 4, 4, 0, 4, 2, 3, 0, 2, 1,
           3, 0, 1, 2, 0, 3, 1, 0, 0, 4, 2, 4])
    zeroed_X   = array([[  0.        ,   0.        ],
           [ -9.93451852,   5.17769196],
           [  0.        ,   0.        ],
           ...     ],
           [ -5.62221677,   0.01380172],
           [  0.        ,   0.        ],
           [ -6.95512025,  -1.26162786]])
    
    ../1/s/sklearn/cluster/tests/test_k_means.py:466: AssertionError
  4. removed
    Needs Triage
    on Jan 12, 2024
  5. lesteve commented on Jun 20, 2024

    @lesteve
    Member

    Let's close since the only failure was test_minibatch_sensible_reassign which should be fixed by #29278

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions