I encountered this error when I was adding text. Hope to get a solution to deal with this error.Thank you very much.
Traceback (most recent call last):
File "/home/jyc23/raptor-master/demo/newdemo.py", line 123, in
RA.add_documents(text)
File "/home/jyc23/raptor-master/raptor/RetrievalAugmentation.py", line 217, in add_documents
self.tree = self.tree_builder.build_from_text(text=docs)
File "/home/jyc23/raptor-master/raptor/tree_builder.py", line 280, in build_from_text
root_nodes = self.construct_tree(all_nodes, all_nodes, layer_to_nodes)
File "/home/jyc23/raptor-master/raptor/cluster_tree_builder.py", line 102, in construct_tree
clusters = self.clustering_algorithm.perform_clustering(
File "/home/jyc23/raptor-master/raptor/cluster_utils.py", line 194, in perform_clustering
clusters = perform_clustering(
File "/home/jyc23/raptor-master/raptor/cluster_utils.py", line 120, in perform_clustering
reduced_embeddings_global = global_cluster_embeddings(embeddings, dim)
File "/home/jyc23/raptor-master/raptor/cluster_utils.py", line 32, in global_cluster_embeddings
reduced_embeddings = umap.UMAP(
File "/home/jyc23/miniconda3/envs/py38/lib/python3.8/site-packages/umap/umap_.py", line 2887, in fit_transform
self.fit(X, y, force_all_finite)
File "/home/jyc23/miniconda3/envs/py38/lib/python3.8/site-packages/umap/umap_.py", line 2354, in fit
X = check_array(X, dtype=np.float32, accept_sparse="csr", order="C", force_all_finite=force_all_finite)
File "/home/jyc23/miniconda3/envs/py38/lib/python3.8/site-packages/sklearn/utils/validation.py", line 957, in check_array
_assert_all_finite(
File "/home/jyc23/miniconda3/envs/py38/lib/python3.8/site-packages/sklearn/utils/validation.py", line 122, in _assert_all_finite
_assert_all_finite_element_wise(
File "/home/jyc23/miniconda3/envs/py38/lib/python3.8/site-packages/sklearn/utils/validation.py", line 171, in _assert_all_finite_element_wise
raise ValueError(msg_err)
ValueError: Input contains NaN.