Closed josephineyates closed 1 year ago
Your traceback points to an error in torch-gpu
caused by sklearn.KNeighbors.kneighbors
. Please open an issue with scikit-learn.
File ~/opt/anaconda3/envs/torch-gpu/lib/python3.8/site-packages/graphtools/graphs.py:424, in kNNGraph.build_kernel_to_data(self, Y, knn, knn_max, bandwidth, bandwidth_scale)
418 _logger.log_debug(
419 "knn search to knn_max ({}) on {}".format(
420 knn_max, len(update_idx)
421 )
422 )
423 # give up - search out to knn_max
--> 424 dist_new, ind_new = knn_tree.kneighbors(
425 Y[update_idx], n_neighbors=search_knn
426 )
427 for i, idx in enumerate(update_idx):
428 distances[idx] = dist_new[i]
File ~/opt/anaconda3/envs/torch-gpu/lib/python3.8/site-packages/sklearn/neighbors/_base.py:763, in KNeighborsMixin.kneighbors(self, X, n_neighbors, return_distance)
756 use_pairwise_distances_reductions = (
757 self._fit_method == "brute"
758 and PairwiseDistancesArgKmin.is_usable_for(
759 X if X is not None else self._fit_X, self._fit_X, self.effective_metric_
760 )
761 )
762 if use_pairwise_distances_reductions:
--> 763 results = PairwiseDistancesArgKmin.compute(
764 X=X,
765 Y=self._fit_X,
766 k=n_neighbors,
767 metric=self.effective_metric_,
768 metric_kwargs=self.effective_metric_params_,
769 strategy="auto",
770 return_distance=return_distance,
771 )
773 elif (
774 self._fit_method == "brute" and self.metric == "precomputed" and issparse(X)
775 ):
776 results = _kneighbors_from_graph(
777 X, n_neighbors=n_neighbors, return_distance=return_distance
778 )
File sklearn/metrics/_pairwise_distances_reduction.pyx:698, in sklearn.metrics._pairwise_distances_reduction.PairwiseDistancesArgKmin.compute()
File ~/opt/anaconda3/envs/torch-gpu/lib/python3.8/site-packages/sklearn/utils/fixes.py:151, in threadpool_limits(limits, user_api)
149 return controller.limit(limits=limits, user_api=user_api)
150 else:
--> 151 return threadpoolctl.threadpool_limits(limits=limits, user_api=user_api)
File ~/opt/anaconda3/envs/torch-gpu/lib/python3.8/site-packages/threadpoolctl.py:171, in threadpool_limits.__init__(self, limits, user_api)
167 def __init__(self, limits=None, user_api=None):
168 self._limits, self._user_api, self._prefixes = \
169 self._check_params(limits, user_api)
--> 171 self._original_info = self._set_threadpool_limits()
File ~/opt/anaconda3/envs/torch-gpu/lib/python3.8/site-packages/threadpoolctl.py:268, in threadpool_limits._set_threadpool_limits(self)
265 if self._limits is None:
266 return None
--> 268 modules = _ThreadpoolInfo(prefixes=self._prefixes,
269 user_api=self._user_api)
270 for module in modules:
271 # self._limits is a dict {key: num_threads} where key is either
272 # a prefix or a user_api. If a module matches both, the limit
273 # corresponding to the prefix is chosed.
274 if module.prefix in self._limits:
File ~/opt/anaconda3/envs/torch-gpu/lib/python3.8/site-packages/threadpoolctl.py:340, in _ThreadpoolInfo.__init__(self, user_api, prefixes, modules)
337 self.user_api = [] if user_api is None else user_api
339 self.modules = []
--> 340 self._load_modules()
341 self._warn_if_incompatible_openmp()
342 else:
File ~/opt/anaconda3/envs/torch-gpu/lib/python3.8/site-packages/threadpoolctl.py:371, in _ThreadpoolInfo._load_modules(self)
369 """Loop through loaded libraries and store supported ones"""
370 if sys.platform == "darwin":
--> 371 self._find_modules_with_dyld()
372 elif sys.platform == "win32":
373 self._find_modules_with_enum_process_module_ex()
File ~/opt/anaconda3/envs/torch-gpu/lib/python3.8/site-packages/threadpoolctl.py:428, in _ThreadpoolInfo._find_modules_with_dyld(self)
425 filepath = filepath.decode("utf-8")
427 # Store the module if it is supported and selected
--> 428 self._make_module_from_path(filepath)
File ~/opt/anaconda3/envs/torch-gpu/lib/python3.8/site-packages/threadpoolctl.py:515, in _ThreadpoolInfo._make_module_from_path(self, filepath)
513 if prefix in self.prefixes or user_api in self.user_api:
514 module_class = globals()[module_class]
--> 515 module = module_class(filepath, prefix, user_api, internal_api)
516 self.modules.append(module)
File ~/opt/anaconda3/envs/torch-gpu/lib/python3.8/site-packages/threadpoolctl.py:606, in _Module.__init__(self, filepath, prefix, user_api, internal_api)
604 self.internal_api = internal_api
605 self._dynlib = ctypes.CDLL(filepath, mode=_RTLD_NOLOAD)
--> 606 self.version = self.get_version()
607 self.num_threads = self.get_num_threads()
608 self._get_extra_info()
File ~/opt/anaconda3/envs/torch-gpu/lib/python3.8/site-packages/threadpoolctl.py:646, in _OpenBLASModule.get_version(self)
643 get_config = getattr(self._dynlib, "openblas_get_config",
644 lambda: None)
645 get_config.restype = ctypes.c_char_p
--> 646 config = get_config().split()
647 if config[0] == b"OpenBLAS":
648 return config[1].decode("utf-8")
AttributeError: 'NoneType' object has no attribute 'split'
Describe the bug Dear all, thank you for this great tool! I am trying to run PHATE on a private dataset (original size (150,11,000)) to obtain the visualization. However, when I call the operator I get the error in the title.
To Reproduce import phate import pandas as pd
X = pd.read_csv("...") phate_operator = phate.PHATE()
from sklearn.decomposition import PCA pca = PCA(n_components=50) X_pca = pca.fit_transform(X.values)
tree_phate = phate_operator.fit_transform(X_pca)
Expected behavior I would expect this to work out of the box. I've tried on the original dataset or on the computed PCA.
Actual behavior
System information:
Output of
phate.__version__
:Output of
pd.show_versions()
: