8000 [MRG] Import sklearn._distributor_init first by ogrisel · Pull Request #15929 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

[MRG] Import sklearn._distributor_init first #15929

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

Merged
merged 1 commit into from
Dec 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions sklearn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,18 @@
# We are not importing the rest of scikit-learn during the build
# process, as it may not be compiled yet
else:
from . import __check_build
# `_distributor_init` allows distributors to run custom init code.
# For instance, for the Windows wheel, this is used to pre-load the
# vcomp shared library runtime for OpenMP embedded in the sklearn/.libs
# sub-folder.
# It is necessary to do this prior to importing show_versions as the
# later is linked to the OpenMP runtime to make it possible to introspect
# it and importing it first would fail if the OpenMP dll cannot be found.
from . import _distributor_init # noqa: F401
from . import __check_build # noqa: F401
from .base import clone
from .utils._show_versions import show_versions

__check_build # avoid flakes unused variable error

__all__ = ['calibration', 'cluster', 'covariance', 'cross_decomposition',
'datasets', 'decomposition', 'dummy', 'ensemble', 'exceptions',
'experimental', 'externals', 'feature_extraction',
Expand All @@ -90,9 +96,6 @@
'clone', 'get_config', 'set_config', 'config_context',
'show_versions']

# Allow distributors to run custom init code
from . import _distributor_init # noqa: F401


def setup_module(module):
"""Fixture for the tests to assure globally controllable seeding of RNGs"""
Expand Down
0