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

[BUG] Investigate pytest failure in kmeans #5530

Open
dantegd opened this issue Jul 28, 2023 · 0 comments
Open

[BUG] Investigate pytest failure in kmeans #5530

dantegd opened this issue Jul 28, 2023 · 0 comments
Labels
? - Needs Triage Need team to review and classify bug Something isn't working

Comments

@dantegd
Copy link
Member

dantegd commented Jul 28, 2023

Describe the bug
Has happened only once as far as I know, error log:

[gw1] linux -- Python 3.10.12 /pyenv/versions/3.10.12/bin/python

nrows = 1000, ncols = 25, nclusters = 5, random_state = 352315
cluster_std = 1.0

    @pytest.mark.parametrize("nrows", [1000, 10000])
    @pytest.mark.parametrize("ncols", [25])
    @pytest.mark.parametrize("nclusters", [2, 5])
    @pytest.mark.parametrize("cluster_std", [1.0, 0.1, 0.01])
    def test_kmeans_clusters_blobs(
        nrows, ncols, nclusters, random_state, cluster_std
    ):
    
        X, y = make_blobs(
            int(nrows),
            ncols,
            nclusters,
            cluster_std=cluster_std,
            shuffle=False,
            random_state=0,
        )
    
        cuml_kmeans = cuml.KMeans(
            init="k-means||",
            n_clusters=nclusters,
            random_state=random_state,
            output_type="numpy",
        )
    
        preds = cuml_kmeans.fit_predict(X)
    
>       assert adjusted_rand_score(cp.asnumpy(preds), cp.asnumpy(y)) >= 0.99
E       assert 0.7181694316998902 >= 0.99
E        +  where 0.7181694316998902 = adjusted_rand_score(array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,...   4, 4, 0, 4, 0, 4, 0, 4, 4, 0, 0, 0, 4, 4, 0, 4, 4, 4, 0, 0, 4, 4,\n       4, 0, 0, 0, 4, 4, 0, 0, 0, 4], dtype=int32), array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n       0., 0., 0., 0., 0., 0., 0., 0., 0., ...., 4., 4., 4., 4., 4., 4., 4., 4.,\n       4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4.],\n      dtype=float32))
E        +    where array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,...   4, 4, 0, 4, 0, 4, 0, 4, 4, 0, 0, 0, 4, 4, 0, 4, 4, 4, 0, 0, 4, 4,\n       4, 0, 0, 0, 4, 4, 0, 0, 0, 4], dtype=int32) = <function asnumpy at 0x7fc30cf6b400>(array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,...   4, 4, 0, 4, 0, 4, 0, 4, 4, 0, 0, 0, 4, 4, 0, 4, 4, 4, 0, 0, 4, 4,\n       4, 0, 0, 0, 4, 4, 0, 0, 0, 4], dtype=int32))
E        +      where <function asnumpy at 0x7fc30cf6b400> = cp.asnumpy
E        +    and   array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n       0., 0., 0., 0., 0., 0., 0., 0., 0., ...., 4., 4., 4., 4., 4., 4., 4., 4.,\n       4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4.],\n      dtype=float32) = <function asnumpy at 0x7fc30cf6b400>(array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n       0., 0., 0., 0., 0., 0., 0., 0., 0., ...., 4., 4., 4., 4., 4., 4., 4., 4.,\n       4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4.],\n      dtype=float32))
E        +      where <function asnumpy at 0x7fc30cf6b400> = cp.asnumpy

happened in #5529

@dantegd dantegd added bug Something isn't working ? - Needs Triage Need team to review and classify labels Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
? - Needs Triage Need team to review and classify bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant