scikit-learn-intelex icon indicating copy to clipboard operation
scikit-learn-intelex copied to clipboard

TypeError: _check_sample_weight() got an unexpected keyword argument 'copy'

Open guankaer opened this issue 3 years ago • 3 comments

TypeError: _check_sample_weight() got an unexpected keyword argument 'copy'

guankaer avatar Jul 06 '22 08:07 guankaer

pip install scikit-learn-intelex

from sklearnex import patch_sklearn

patch_sklearn()

when using the function fit(), the error shows.

guankaer avatar Jul 06 '22 08:07 guankaer

Hi @guankaer could you please provide more details about python env. python, sklearn, sklearnex versions

samir-nasibli avatar Jul 27 '22 12:07 samir-nasibli

Hi @guankaer, could you provide some code + OS, python, sklearn and sklearnex versions to reproduce this issue, please?

Alexsandruss avatar Aug 23 '22 18:08 Alexsandruss

Hi, I faced the same problem and it seems that the root cause is that here in case if sklearn version is greater or equal to 0.24, 'copy' argument is used, however it was introduced for _check_sample_weight only in 0.24.2. So this problem occurs only for sklearn 0.24 and 0.24.1

ltoropova avatar Nov 07 '22 06:11 ltoropova

Thanks - the expectation is that latest past releases would be used.

napetrov avatar Dec 24 '22 14:12 napetrov