firefly-cpp / NiaAML

Python automated machine learning framework.
MIT License
32 stars 12 forks source link

Test with python-scikit-learn 1.1.0 is not passing #71

Closed carlosal1015 closed 2 years ago

carlosal1015 commented 2 years ago

Hi, the following test conftest.py is not passing with recent version of sklearn, with versions less than 1.1.0, all the tests are passing.

niaaml/__init__.py:1: in <module>
    from niaaml import classifiers
niaaml/classifiers/__init__.py:2: in <module>
    from niaaml.classifiers.random_forest import RandomForest
niaaml/classifiers/random_forest.py:8: in <module>
    from sklearn.exceptions import (
E   ImportError: cannot import name 'ChangedBehaviorWarning' from 'sklearn.exceptions' (/usr/lib/python3.10/site-packages/sklearn/exceptions.py)
============================================================================== short test summary info ==============================================================================
ERROR  - ImportError: cannot import name 'ChangedBehaviorWarning' from 'sklearn.exceptions' (/usr/lib/python3.10/site-packages/sklearn/exceptions.py)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================================================================= 1 error in 0.70s ==================================================================================

Setup:

OS: Arch Linux

Steps to reproduce:

For easy setup, can be reproduce with an Arch Linux based with base-devel group and AUR helper.

$ docker run -it --rm registry.gitlab.com/dune-archiso/images/dune-archiso-yay
$ yay -Syu python-niaaml
firefly-cpp commented 2 years ago

It is also failing on Alpine Linux.

firefly-cpp commented 2 years ago

@lukapecnik, please check it out.

zStupan commented 2 years ago

ChangedBehaviorWarning and NonBLASDotWarning were deprecated in scikit-learn 0.24.2 and removed in the newest version because they were not being used. They have to be removed from the imports and constructors of every classifier.

firefly-cpp commented 2 years ago

@zStupan, can we ask you to propose a PR with suggested changes?

firefly-cpp commented 2 years ago

@zStupan, according to the logs, a previous version of the scikit-learn package is installed. The installed version may be the main problem.