Skip to content

Commit acac78f

Browse files
committed
address review comments
1 parent 96083fa commit acac78f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

python-package/lightgbm/dask.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ def _predict(model, data, raw_score=False, pred_proba=False, pred_leaf=False, pr
387387
class _LGBMModel:
388388
def __init__(self):
389389
if not all((DASK_INSTALLED, PANDAS_INSTALLED, SKLEARN_INSTALLED)):
390-
raise LightGBMError('Dask, Pandas and Scikit-learn are required for this module')
390+
raise LightGBMError('dask, pandas and scikit-learn are required for lightgbm.dask')
391391

392392
def _fit(self, model_factory, X, y=None, sample_weight=None, group=None, client=None, **kwargs):
393393
"""Docstring is inherited from the LGBMModel."""

python-package/lightgbm/engine.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,15 +335,15 @@ def _make_n_folds(full_data, folds, nfold, params, seed, fpreproc=None, stratifi
335335
"xe_ndcg", "xe_ndcg_mart", "xendcg_mart"}
336336
for obj_alias in _ConfigAliases.get("objective")):
337337
if not SKLEARN_INSTALLED:
338-
raise LightGBMError('Scikit-learn is required for ranking cv.')
338+
raise LightGBMError('scikit-learn is required for ranking cv')
339339
# ranking task, split according to groups
340340
group_info = np.array(full_data.get_group(), dtype=np.int32, copy=False)
341341
flatted_group = np.repeat(range(len(group_info)), repeats=group_info)
342342
group_kfold = _LGBMGroupKFold(n_splits=nfold)
343343
folds = group_kfold.split(X=np.zeros(num_data), groups=flatted_group)
344344
elif stratified:
345345
if not SKLEARN_INSTALLED:
346-
raise LightGBMError('Scikit-learn is required for stratified cv.')
346+
raise LightGBMError('scikit-learn is required for stratified cv')
347347
skf = _LGBMStratifiedKFold(n_splits=nfold, shuffle=shuffle, random_state=seed)
348348
folds = skf.split(X=np.zeros(num_data), y=full_data.get_label())
349349
else:

python-package/lightgbm/sklearn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ def __init__(self, boosting_type='gbdt', num_leaves=31, max_depth=-1,
290290
and you should group grad and hess in this way as well.
291291
"""
292292
if not SKLEARN_INSTALLED:
293-
raise LightGBMError('Scikit-learn is required for this module')
293+
raise LightGBMError('scikit-learn is required for lightgbm.sklearn')
294294

295295
self.boosting_type = boosting_type
296296
self.objective = objective

0 commit comments

Comments
 (0)