Skip to content

Test problems using python -m nose -s hdbscan #652

Open
@xavgit

Description

@xavgit

Hi,
I have installed hdbscan with pip without any errors:
...........................................................................................
Installing collected packages: hdbscan
Attempting uninstall: hdbscan
Found existing installation: hdbscan 0.8.37
Uninstalling hdbscan-0.8.37:
Successfully uninstalled hdbscan-0.8.37
Successfully installed hdbscan-0.8.38.post1

When I run the following I receive errors.

python3 -m nose -s hdbscan
Exception ignored on calling ctypes callback function: <function _ThreadpoolInfo._find_modules_with_dl_iterate_phdr..match_module_callback at 0x7fa138d46f70>
Traceback (most recent call last):
File "/home/xxxx/.local/lib/python3.8/site-packages/threadpoolctl.py", line 400, in match_module_callback
self._make_module_from_path(filepath)
File "/home/xxxx/.local/lib/python3.8/site-packages/threadpoolctl.py", line 515, in _make_module_from_path
module = module_class(filepath, prefix, user_api, internal_api)
File "/home/xxxx/.local/lib/python3.8/site-packages/threadpoolctl.py", line 606, in init
self.version = self.get_version()
File "/home/xxxx/.local/lib/python3.8/site-packages/threadpoolctl.py", line 646, in get_version
config = get_config().split()
AttributeError: 'NoneType' object has no attribute 'split'
..E..................E............................../home/xxxx/.local/lib/python3.8/site-packages/hdbscan/tests/test_hdbscan.py:80: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (matplotlib.pyplot.figure) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam figure.max_open_warning). Consider using matplotlib.pyplot.close().
plt.figure()
Exception ignored on calling ctypes callback function: <function _ThreadpoolInfo._find_modules_with_dl_iterate_phdr..match_module_callback at 0x7fa114b849d0>
Traceback (most recent call last):
File "/home/xxxx/.local/lib/python3.8/site-packages/threadpoolctl.py", line 400, in match_module_callback
self._make_module_from_path(filepath)
File "/home/xxxx/.local/lib/python3.8/site-packages/threadpoolctl.py", line 515, in _make_module_from_path
module = module_class(filepath, prefix, user_api, internal_api)
File "/home/xxxx/.local/lib/python3.8/site-packages/threadpoolctl.py", line 606, in init
self.version = self.get_version()
File "/home/xxxx/.local/lib/python3.8/site-packages/threadpoolctl.py", line 646, in get_version
config = get_config().split()
AttributeError: 'NoneType' object has no attribute 'split'
Exception ignored on calling ctypes callback function: <function _ThreadpoolInfo._find_modules_with_dl_iterate_phdr..match_module_callback at 0x7fa11435daf0>
Traceback (most recent call last):
File "/home/xxxx/.local/lib/python3.8/site-packages/threadpoolctl.py", line 400, in match_module_callback
self._make_module_from_path(filepath)
File "/home/xxxx/.local/lib/python3.8/site-packages/threadpoolctl.py", line 515, in _make_module_from_path
module = module_class(filepath, prefix, user_api, internal_api)
File "/home/xxxx/.local/lib/python3.8/site-packages/threadpoolctl.py", line 606, in init
self.version = self.get_version()
File "/home/xxxx/.local/lib/python3.8/site-packages/threadpoolctl.py", line 646, in get_version
config = get_config().split()
AttributeError: 'NoneType' object has no attribute 'split'
..............EE..........E

ERROR: Check warning on unsupported metric.

Traceback (most recent call last):
File "sklearn/metrics/_dist_metrics.pyx", line 420, in sklearn.metrics._dist_metrics.DistanceMetric64.get_metric
KeyError: 'cosine'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/xxxx/.local/lib/python3.8/site-packages/nose/case.py", line 198, in runTest
self.test(*self.arg)
File "/home/xxxx/.local/lib/python3.8/site-packages/hdbscan/tests/test_branches.py", line 147, in test_branch_detection_data_with_non_tree_metric
c = HDBSCAN(
File "/home/xxxx/.local/lib/python3.8/site-packages/hdbscan/hdbscan_.py", line 1221, in fit
) = hdbscan(clean_data, **kwargs)
File "/home/xxxx/.local/lib/python3.8/site-packages/hdbscan/hdbscan_.py", line 869, in hdbscan
(single_linkage_tree, result_min_span_tree) = memory.cache(
File "/home/xxxx/.local/lib/python3.8/site-packages/joblib/memory.py", line 349, in call
return self.func(*args, **kwargs)
File "/home/xxxx/.local/lib/python3.8/site-packages/hdbscan/hdbscan_.py", line 384, in _hdbscan_boruvka_balltree
tree = BallTree(X, metric=metric, leaf_size=leaf_size, **kwargs)
File "sklearn/neighbors/_binary_tree.pxi", line 837, in sklearn.neighbors._ball_tree.BinaryTree.init
File "sklearn/metrics/_dist_metrics.pyx", line 211, in sklearn.metrics._dist_metrics.DistanceMetric.get_metric
File "sklearn/metrics/_dist_metrics.pyx", line 422, in sklearn.metrics._dist_metrics.DistanceMetric64.get_metric
ValueError: Unrecognized metric 'cosine'

======================================================================
ERROR: hdbscan.tests.test_branches.test_branch_detector_is_sklearn_estimator

Traceback (most recent call last):
File "/home/xxxx/.local/lib/python3.8/site-packages/nose/case.py", line 198, in runTest
self.test(*self.arg)
File "/home/xxxx/.local/lib/python3.8/site-packages/hdbscan/tests/test_branches.py", line 473, in test_branch_detector_is_sklearn_estimator
check_estimator(BranchDetector)
File "/home/xxxx/.local/lib/python3.8/site-packages/sklearn/utils/estimator_checks.py", line 616, in check_estimator
raise TypeError(msg)
TypeError: Passing a class was deprecated in version 0.23 and isn't supported anymore from 0.24.Please pass an instance instead.

======================================================================
ERROR: hdbscan.tests.test_hdbscan.test_hdbscan_is_sklearn_estimator

Traceback (most recent call last):
File "/home/xxxx/.local/lib/python3.8/site-packages/nose/case.py", line 198, in runTest
self.test(*self.arg)
File "/home/xxxx/.local/lib/python3.8/site-packages/hdbscan/tests/test_hdbscan.py", line 654, in test_hdbscan_is_sklearn_estimator
check_estimator(HDBSCAN)
File "/home/xxxx/.local/lib/python3.8/site-packages/sklearn/utils/estimator_checks.py", line 616, in check_estimator
raise TypeError(msg)
TypeError: Passing a class was deprecated in version 0.23 and isn't supported anymore from 0.24.Please pass an instance instead.

======================================================================
ERROR: hdbscan.tests.test_prediction_utils.test_safe_always_positive_division

Traceback (most recent call last):
File "/home/xxxx/.local/lib/python3.8/site-packages/nose/case.py", line 198, in runTest
self.test(*self.arg)
TypeError: test_safe_always_positive_division() missing 1 required positional argument: 'denominator'

======================================================================
ERROR: hdbscan.tests.test_rsl.test_rsl_is_sklearn_estimator

Traceback (most recent call last):
File "/home/xxxx/.local/lib/python3.8/site-packages/nose/case.py", line 198, in runTest
self.test(*self.arg)
File "/home/xxxx/.local/lib/python3.8/site-packages/hdbscan/tests/test_rsl.py", line 197, in test_rsl_is_sklearn_estimator
check_estimator(RobustSingleLinkage)
File "/home/xxxx/.local/lib/python3.8/site-packages/sklearn/utils/estimator_checks.py", line 616, in check_estimator
raise TypeError(msg)
TypeError: Passing a class was deprecated in version 0.23 and isn't supported anymore from 0.24.Please pass an instance instead.


Ran 79 tests in 13.621s

FAILED (errors=5)

Thanks.
Saverio

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions