Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
With at least 2,048 speaker embeddings and no
oracle_num, CPU float32 tensors reach UMAP 0.6.0 with a PyTorch dtype and fail withTypeError: Cannot interpret 'torch.float32' as a data type.Convert Tensor inputs with
detach().cpu().numpy()in the automatic large-input branch before UMAP and centroid merging. Add a seeded, single-threaded regression using 2,048 × 192 synthetic embeddings for ndarray, Tensor, and Tensor with gradients. It checks the four-speaker partition and input values.Related to #3908. Reporter workload validation remains outstanding.
Type of change
Validation
On macOS arm64, Python 3.12.14, PyTorch 2.10.0, NumPy 2.4.6, SciPy 1.17.1, scikit-learn 1.9.1, UMAP 0.6.0, numba 0.68.1 and pynndescent 0.7.0, with
NUMBA_NUM_THREADS=1 OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1:python -m pytest -q tests/test_cluster_backend.py tests/test_numpy_cluster_compatibility.py— 59 passed.tests/test_numpy_compatibility.py— 67 passed, 1 failed. The failure istest_frontend_applies_cmvn_and_preserves_padding, with librosa 0.11.0 reportingWindow size mismatch: 512 != 400. It also fails on the unmodified baseline in the same environment.python -m compileall -q funasr examples testsgit diff --checkUMAP layout and HDBSCAN default-change warnings remain visible. The standalone CPU reproduction completes with 2,048 integer labels matching the four synthetic speakers.
User impact
Automatic speaker clustering can complete with CPU float32 Tensor inputs when it reaches the UMAP branch.
Notes for reviewers
Unverified inputs and environments include GPU, bfloat16, real recordings, pretrained model accuracy, other UMAP/NumPy versions, and the reporter's Python 3.11.15 / PyTorch 2.15.0 combination.
AI assistance disclosure: OpenAI Codex assisted with the implementation, regression tests, local validation, and PR description.