hdbscan icon indicating copy to clipboard operation
hdbscan copied to clipboard

Initialisation fails with joblib 1.2.0

Open phgn0 opened this issue 2 years ago • 7 comments

With the latest joblib dependency version released today, HDBSCAN fails to initialize using the default parameters:

__init__() got an unexpected keyword argument 'cachedir':
File "/usr/local/lib/python3.9/site-packages/hdbscan/hdbscan_.py", line 509, in <module>
File "/usr/local/lib/python3.9/site-packages/hdbscan/__init__.py", line 1, in <module>

It seems like the Memory() cachedir parameter was renamed to location, according to https://joblib.readthedocs.io/en/latest/generated/joblib.Memory.html. I'm not sure if there are other changes.

For now this can be resolved by pinning joblib==1.1.0.

phgn0 avatar Sep 16 '22 11:09 phgn0

The commit comment to that change in joblib says "removed deprecated cachedir" so it seems to have been a deliberate cleanup.

kupuguy avatar Sep 16 '22 11:09 kupuguy

So it looks like we can just use a positional argument and support both versions. I'll see if I can get this done soon.

lmcinnes avatar Sep 16 '22 12:09 lmcinnes

I'm looking forward to the release containing this fix!

moi90 avatar Sep 19 '22 18:09 moi90

As a temporary remedy, one can force to install older joblib in order to avoid this issue:

# after installing hdbscan

pip --force-reinstall install joblib=1.1.0

datlife avatar Sep 20 '22 18:09 datlife

Thanks for fixing this! Can I also add my voice to request a release as soon as possible, as this is breaking various CI and conda recipes which depend on HDBSCAN and are automatically pulling in the newer joblib

johnlees avatar Sep 28 '22 15:09 johnlees

Given this new CVE, affecting joblib versions < 1.2.0, it would be great to get a new release out.

uros-r avatar Oct 01 '22 14:10 uros-r

Wasn't sure what CVE was until I saw a pip vulnerability and came back to this thread, so for others, be aware that there is a vulnerability. Thanks for bringing to attention @uros-r

sgbaird avatar Oct 04 '22 03:10 sgbaird