-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix deprecation warning force_all_finite -> ensure_all_finite from 1.7 to 1.8 #206
base: main
Are you sure you want to change the base?
Fix deprecation warning force_all_finite -> ensure_all_finite from 1.7 to 1.8 #206
Conversation
Hi @icarosadero , thanks a lot for fixing! Do you happen to know when the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok so it seems that this is indeed an issue also for recent versions of scikit-learn:
If you want to take a shot at solving this, have a look at e.g. this snippet of code
CEBRA/cebra/integrations/sklearn/cebra.py
Lines 46 to 50 in 5f46c32
def check_version(estimator): | |
# NOTE(stes): required as a check for the old way of specifying tags | |
# https://github.com/scikit-learn/scikit-learn/pull/29677#issuecomment-2334229165 | |
from packaging import version | |
return version.parse(sklearn.__version__) < version.parse("1.6.dev") |
You could then implement a conditional part where the version is checked, and the arg is passed based on the version of sklearn.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a suggestion which is a bit more crisp and avoids code duplication
could you also update the PR description with the reference to the docs, pointing that this API change happend from 1.7.x to 1.8.x? |
Co-authored-by: Steffen Schneider <[email protected]>
Co-authored-by: Steffen Schneider <[email protected]>
Co-authored-by: Steffen Schneider <[email protected]>
I keep getting this renaming warning from sklearn, so I just renamed the variables to the new ones:
See the deprecation warning in the docs