Skip to content

[CI] Spectral clustering reproducibility assertions fail across multiple PRs #8869

Closed
NVIDIA/raft
#3208

Description

@csadorf

Summary

Spectral clustering reproducibility tests fail in CI on PRs #8865, #8866, and #8867. The tests compare labels from repeated fits with the same input and random_state=42 and report unequal label arrays.

The failures below were observed on November 5, 2026, in native Python tests, cuDF-pandas integration, and cuml.accel integration tests, across conda and wheel jobs.

Failing job/test/component:

  • python/cuml/tests/test_spectral_clustering.py::test_reproducibility_with_random_state
  • python/cuml/cuml_accel_tests/integration/test_spectral_clustering.py::test_spectral_clustering_random_state

Failure observed in:

Each linked job's log was inspected. “Native” and “accel” identify which of the two tests above failed in that job. All cited runs are attempt 1.

PR Job / matrix Failing test(s) Log
#8865 Conda single-GPU; CUDA 13.0.3, Python 3.14, amd64, RTX PRO 6000, latest deps Native and accel https://github.com/NVIDIA/cuml/actions/runs/42103700178/job/127520099234
#8865 Wheel single-GPU; CUDA 12.2.2, Python 3.12, ARM64, A100, latest deps Native https://github.com/NVIDIA/cuml/actions/runs/42103700178/job/127521182002
#8866 Conda single-GPU; CUDA 13.0.3, Python 3.14, amd64, RTX PRO 6000, latest deps Native and accel https://github.com/NVIDIA/cuml/actions/runs/42107548569/job/127533569701
#8866 Conda single-GPU; CUDA 12.2.2, Python 3.12, amd64, H100, oldest deps Native and accel https://github.com/NVIDIA/cuml/actions/runs/42107548569/job/127533569512
#8866 Wheel single-GPU; CUDA 13.4.3, Python 3.14, amd64, H100, latest deps Native https://github.com/NVIDIA/cuml/actions/runs/42107548569/job/127535754283
#8867 Conda single-GPU; CUDA 13.0.3, Python 3.14, amd64, RTX PRO 6000, latest deps Native https://github.com/NVIDIA/cuml/actions/runs/42121342818/job/127580748874
#8867 Conda single-GPU; CUDA 13.4.3, Python 3.13, ARM64, L4, latest deps Native https://github.com/NVIDIA/cuml/actions/runs/42121342818/job/127580748881
#8867 Conda cuDF-pandas integration; CUDA 13.0.3, Python 3.14, amd64, RTX PRO 6000, latest deps Native https://github.com/NVIDIA/cuml/actions/runs/42121342818/job/127580749850
#8867 Wheel single-GPU; CUDA 12.9.2, Python 3.12, amd64, RTX PRO 6000, oldest deps Native https://github.com/NVIDIA/cuml/actions/runs/42121342818/job/127581981886

Failure details

Native Python test

  • Failing step or test: test_reproducibility_with_random_state
  • File or test name: python/cuml/tests/test_spectral_clustering.py:188
  • Error message (from [RF] Deprecate the max_leaves parameter. #8867's amd64 conda job):
    cp.testing.assert_array_equal(results[0], results[i])
    AssertionError:
    Arrays are not equal
    Mismatched elements: 500 / 500 (100%)
    

The test generates 500 samples with four centers, converts the data to float32, and performs three fits with n_clusters=4, affinity="nearest_neighbors", n_neighbors=15, n_init=10, and random_state=42. It compares each subsequent label array with the first.

cuml.accel integration test

  • Failing step or test: test_spectral_clustering_random_state
  • File or test name: python/cuml/cuml_accel_tests/integration/test_spectral_clustering.py:170
  • Error message:
    assert np.array_equal(sc1.labels_, sc2.labels_), (
        "Results should be consistent with the same random_state"
    )
    AssertionError: Results should be consistent with the same random_state
    

The logged estimators use SpectralClustering(affinity='nearest_neighbors', n_clusters=3, random_state=42).

The logs show unequal label IDs. Whether the complete arrays differ only by a permutation of cluster IDs has not been verified.

Related historical report: #7757 concerned unequal labels after refitting in a pickle test. PR #8651 changed that test to compare the unpickled model's stored labels_ rather than refitting it. The failures listed here occur in separate reproducibility tests.

Environment

This list includes all spectral reproducibility failures confirmed from the logs inspected so far; it does not attribute other failed matrix jobs whose logs have not been inspected.

Activity

  1. added
    bug
    on Nov 5, 2026
  2. trivialfis commented on Nov 6, 2026

    @trivialfis
    Contributor

    The rest of the failure is about k-means, which we might wait for NVIDIA/cuvs#2801

  3. csadorf commented on Nov 6, 2026

    @csadorf
    ContributorAuthor

    The rest of the failure is about k-means, which we might wait for NVIDIA/cuvs#2801

    I've created https://github.com/NVIDIA/cuml/issues/8872to track that separately.

  4. self-assigned this
    on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugci

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions