Skip to content
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

hooks: update hooks for scikit-learn #53

Merged
merged 5 commits into from
Oct 4, 2020

Conversation

rokm
Copy link
Member

@rokm rokm commented Oct 3, 2020

Add basic import test for each scikit-learn (sklearn) submodule, and update hooks so that all tests pass with scikit-learn v.0.21, v.0.22, and v.0.23.

A battery of tests that individually import each of sklearn
submodules. The list of tests is based on submodules available
in the latest release (0.23.x), but it has been unchanged since
0.21.

Incidentally, scikit-learn 0.21 supports Python 3.5-3.7, scikit-learn
0.22 supports Python 3.5-3.8, while the latest versions require
Python 3.6 or newer.

Therefore, the test supports scikit-learn >= 0.21, and the same
versions will be targeted by our hooks.
Add hidden imports required for basic submodule import tests
to pass under scikit-learn 0.22.x with python 3.8.5 on linux.
In scikit-learn v.0.23, the sklearn.cluster contains a hidden
dependency on threadpoolctl.
@rokm rokm requested review from a team and bwoodsend and removed request for a team October 3, 2020 10:22
@rokm
Copy link
Member Author

rokm commented Oct 3, 2020

Cleaned up hook-sklearn.metrics.cluster.py. It is still required
by scikit-learn 0.21, but sklearn.utils.sparsetools hidden module
has been removed during transition from 0.20 to 0.21.

The hook-sklearn.mixture.py is redundant, as all of its required
hidden modules are covered by hooks for other top-level modules,
for example the hook for sklearn.neighbors. The latter now
contains hidden import names that are compatible with both 0.21
and 0.22+.
@bwoodsend
Copy link
Member

Hmm, I could do with adding a if installing dependencies fails: skip to that CI to catch unavailable Python version/package version combos.

Copy link
Member

@bwoodsend bwoodsend left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another spotless PR.

@bwoodsend bwoodsend merged commit 628c34d into pyinstaller:master Oct 4, 2020
@rokm rokm deleted the fix-sklearn branch October 14, 2020 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants