Skip to content

Commit

Permalink
use vendoring import
Browse files Browse the repository at this point in the history
  • Loading branch information
glemaitre committed Dec 8, 2024
1 parent 3c2f26f commit 37f209e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# coding: utf-8
"""Ease developer experience to support multiple versions of scikit-learn.
This file is intended to be vendored in your project if you do not want to depend on
Expand Down
4 changes: 2 additions & 2 deletions python-package/lightgbm/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from sklearn.exceptions import NotFittedError
from sklearn.model_selection import BaseCrossValidator, GroupKFold, StratifiedKFold
from sklearn.utils.validation import _check_sample_weight
from .sklearn_compat.utils.validation import validate_data
from ._sklearn_compat import validate_data

SKLEARN_INSTALLED = True
_LGBMBaseCrossValidator = BaseCrossValidator
Expand Down Expand Up @@ -65,7 +65,7 @@ class _LGBMRegressorBase: # type: ignore

# additional scikit-learn imports only for type hints
if TYPE_CHECKING:
from .sklearn_compat.utils import Tags as _sklearn_Tags # noqa: F401
from ._sklearn_compat import Tags as _sklearn_Tags # noqa: F401

"""pandas"""
try:
Expand Down

0 comments on commit 37f209e

Please sign in to comment.