From eb92e79fb94e7b3df8f27c8ce3e607a70dff2a2e Mon Sep 17 00:00:00 2001
From: 语帆 <yf352572@alibaba-inc.com>
Date: 星期三, 28 二月 2024 15:21:32 +0800
Subject: [PATCH] test

---
 funasr/models/campplus/cluster_backend.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/funasr/models/campplus/cluster_backend.py b/funasr/models/campplus/cluster_backend.py
index 3bac0a0..72d06da 100644
--- a/funasr/models/campplus/cluster_backend.py
+++ b/funasr/models/campplus/cluster_backend.py
@@ -4,7 +4,6 @@
 #  MIT License  (https://opensource.org/licenses/MIT)
 # Modified from 3D-Speaker (https://github.com/alibaba-damo-academy/3D-Speaker)
 
-import umap
 import scipy
 import torch
 import sklearn
@@ -119,6 +118,7 @@
         self.metric = metric
 
     def __call__(self, X):
+        import umap.umap_ as umap
         umap_X = umap.UMAP(
             n_neighbors=self.n_neighbors,
             min_dist=0.0,
@@ -156,6 +156,7 @@
         if X.shape[0] < 20:
             return np.zeros(X.shape[0], dtype='int')
         if X.shape[0] < 2048 or k is not None:
+            # unexpected corner case
             labels = self.spectral_cluster(X, k)
         else:
             labels = self.umap_hdbscan_cluster(X)

--
Gitblit v1.9.1