Repository navigation
Description
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_statepython/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
- Branch or PR: [RF] Fix multi-class with large number of classes. #8865, Add keyword selection and collection-only benchmark CLI options #8866, and [RF] Deprecate the max_leaves parameter. #8867; occurrence links and matrices above.
- OS/architecture: Ubuntu 22.04, 24.04, and 26.04, and Rocky Linux 8; amd64 and ARM64.
- Python: 3.12, 3.13, and 3.14.
- CUDA: 12.2.2, 12.9.2, 13.0.3, and 13.4.3.
- GPU: A100, H100, L4, and RTX PRO 6000.
- Driver/dependency variant: earliest-driver/oldest-deps, earliest-driver/latest-deps, latest-driver/oldest-deps, and latest-driver/latest-deps, as specified in the linked job matrices.
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
Xfail intermittent spectral clustering reproducibility assertions (#8870
trivialfis commentedon Nov 6, 2026
The rest of the failure is about k-means, which we might wait for NVIDIA/cuvs#2801
csadorf commentedon Nov 6, 2026
I've created https://github.com/NVIDIA/cuml/issues/8872to track that separately.
Determinism of row summing kernel in the narrow row and few key regime (
[26.12] Backport deterministic few-keys row reduction (#3202) (#3210)
Restore spectral clustering reproducibility tests (#8904)