diff --git a/python-package/lightgbm/compat.py b/python-package/lightgbm/compat.py index 45650a93f1a5..377d1fae47c5 100644 --- a/python-package/lightgbm/compat.py +++ b/python-package/lightgbm/compat.py @@ -33,7 +33,6 @@ _LGBMComputeSampleWeight = compute_sample_weight _LGBMValidateData = validate_data except ImportError: - raise SKLEARN_INSTALLED = False class _LGBMModelBase: # type: ignore