pyensemble/wildwood

Update package for modern Sklearn (>=1.1) and other package requirements

Closed this issue · 10 comments

Package requirements for the current implementation of wildwood do not allow for use with sklearn >= 1.1;

The private function _joblib_parallel_args was removed, see link.

Looks like _joblib_parallel_args, delayed in forest.py are affected. The error that I get is below:

  File "<stdin>", line 1, in <module>
  File "/Users/.pyenv/versions/3.10.11/lib/python3.10/site-packages/wildwood/__init__.py", line 2, in <module>
    from .forest import ForestClassifier, ForestRegressor
  File "/Users/.pyenv/versions/3.10.11/lib/python3.10/site-packages/wildwood/forest.py", line 22, in <module>
    from sklearn.utils.fixes import _joblib_parallel_args, delayed
ImportError: cannot import name '_joblib_parallel_args' from 'sklearn.utils.fixes' (/Users/.pyenv/versions/3.10.11/lib/python3.10/site-packages/sklearn/utils/fixes.py)
imerad commented

Thank you for pointing this out. This problem has been addressed by the recent update to the code. I suggest you try again after pulling the latest version.

@imerad

I'm not sure that I follow what you're saying. The latest version on pypi is wildwood == 0.2; pip says it's up to date when I try to update. What am I missing?

uludag commented

@vtsanders, wildwood-0.2 on pypi is from two years ago, the joblib repair @imerad mentioned is in the last two months.

I have tried the pip install git+https://github.com/pyensemble/wildwood.git option

This produced the following error in a mamba based environment

error: Multiple top-level packages discovered in a flat-layout: ['wildwood', 'experiments'].

With an Ubuntu Python-3.10 environment the install command did not return error but the package was installed with the name UNKNOWN; the package is not importable.

For now I try working with a local copy of the project opened with PyCharm, in a new file in its tests folder.

I wanted to try wildwood after reading that it has native support for categorical features. I had good results with my initial tests and very happy --mahmut

imerad commented

Sorry for the confusion. The update I mentioned only affected the git repository. As for the pip package, we will try to fix it shortly.

Highly related, I suppose?:
ImportError: cannot import name '_joblib_parallel_args' from 'sklearn.utils.fixes'

@markusloecher

Highly related, I suppose?: ImportError: cannot import name '_joblib_parallel_args' from 'sklearn.utils.fixes'

Yes it is.

I would still love some advice on how to install wildwood, none of the suggestions worked for me.
Installing it directly from git is not successful:
error: Multiple top-level packages discovered in a flat-layout: ['wildwood', 'experiments'

Thanks!

Dear all, I just updated a new version 0.3 that should solve all these issues, hopefully, a simple pip install wildwood==0.3 should do the trick.
All dependencies have been updated to the latest greatest versions of everything

uludag commented

Thanks Stephane, I have tried the simple pip install with three different Python environments, all worked fine.
--mahmut

Awesome, good to hear