-
-
Notifications
You must be signed in to change notification settings - Fork 256
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
Specify HLG layer name during delayed object creation in fit #898
Conversation
…it method (Only for dask version post 2021_12_0 release)
@@ -20,7 +20,7 @@ | |||
|
|||
# Copied from scikit-learn/sklearn/utils/fixes.py, can be removed once we drop | |||
# support for scikit-learn < 0.18.1 or numpy < 1.12.0. | |||
if LooseVersion(np.__version__) < "1.12.0": | |||
if packaging.version.parse(np.__version__) < packaging.version.parse("1.12.0"): |
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.
These individual checks can probably be moved to the _compat
module similar to how it's done in other parts of the codebase.
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.
Alternatively, given that today the minimum supported NumPy version for Dask is 1.18, we could probably just bump the minimum supported version for Dask-ML too (though let's handle that in a separate PR)
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.
Thanks @ayushdg. @gjoseph92 would you mind taking a quick look at the changes here?
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.
Thanks for fixing @ayushdg, LGTM. Sorry about the breaking change 😞
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.
Thanks @ayushdg @gjoseph92 -- just pushed an empty commit to trigger a CI build against the main
branch of dask
(so we should now be exercising both the if DASK_2022_01_0
and else
code paths below)
@@ -20,7 +20,7 @@ | |||
|
|||
# Copied from scikit-learn/sklearn/utils/fixes.py, can be removed once we drop | |||
# support for scikit-learn < 0.18.1 or numpy < 1.12.0. | |||
if LooseVersion(np.__version__) < "1.12.0": | |||
if packaging.version.parse(np.__version__) < packaging.version.parse("1.12.0"): |
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.
Alternatively, given that today the minimum supported NumPy version for Dask is 1.18, we could probably just bump the minimum supported version for Dask-ML too (though let's handle that in a separate PR)
Whoops, forgot the |
Fixes #895.
Updated the
fit
method in the_partial
module to specify the layer during delayed object creation as required after dask/dask#8452.Also added a commit unrelated to the issue replacing the usage of
distutils.version.LooseVersion
withpackaging.version.parse
as a side effect of needing it while testing locally. Happy to remove it or open a separate pr for those changes if preferred.