mne-tools / mne-features

MNE-Features software for extracting features from multivariate time series
https://mne-tools.github.io/mne-features/
BSD 3-Clause "New" or "Revised" License
139 stars 32 forks source link

extract_features returns TypeError #69

Closed kwdoyle closed 2 years ago

kwdoyle commented 2 years ago

mne_features.feature_extraction.extract_features() now returns the error TypeError: _check_input() missing 1 required keyword-only argument: 'reset'.

Checking the arguments of this method on line 87 within feature_extraction.py does show that 'reset' is apparently an existing argument, as self._check_input.__code__.co_varnames returns ('self', 'X', 'reset')

agramfort commented 2 years ago

is it related to the sklearn update? what sklearn version are you using?

kwdoyle commented 2 years ago

I believe it might be, as this problem does not occur on my other machine. The sklearn version on the problematic computer is 1.0, whereas the other computer has version 0.23.2

agramfort commented 2 years ago

can you try to investigate?

paulroujansky commented 2 years ago

This bug is due to PR https://github.com/scikit-learn/scikit-learn/pull/20961 which amended FunctionTransfrom._check_input() so that arg reset is now required, causing the bug mentionned hereabove. The PR was included in scikit-learn release 1.0.

_check_input() calls BaseEstimator._validate_data(), which advises, from the doc:

It is recommended to call reset=True in fit and in the first call to partial_fit. All other methods that validate X should set reset=False.

agramfort commented 2 years ago

ok !

can you send a PR here to fix the problem?

thx

jbschiratti commented 2 years ago

This should be fixed by #71.