Unverified Commit 709ea4ca authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[python-package] [dask] fix mypy errors about Dask fit() return types (#5756)

parent e4231205
......@@ -1175,7 +1175,7 @@ class DaskLGBMClassifier(LGBMClassifier, _DaskLGBMModel):
**kwargs: Any
) -> "DaskLGBMClassifier":
"""Docstring is inherited from the lightgbm.LGBMClassifier.fit."""
return self._lgb_dask_fit(
self._lgb_dask_fit(
model_factory=LGBMClassifier,
X=X,
y=y,
......@@ -1189,6 +1189,7 @@ class DaskLGBMClassifier(LGBMClassifier, _DaskLGBMModel):
eval_metric=eval_metric,
**kwargs
)
return self
_base_doc = _lgbmmodel_doc_fit.format(
X_shape="Dask Array or Dask DataFrame of shape = [n_samples, n_features]",
......@@ -1378,7 +1379,7 @@ class DaskLGBMRegressor(LGBMRegressor, _DaskLGBMModel):
**kwargs: Any
) -> "DaskLGBMRegressor":
"""Docstring is inherited from the lightgbm.LGBMRegressor.fit."""
return self._lgb_dask_fit(
self._lgb_dask_fit(
model_factory=LGBMRegressor,
X=X,
y=y,
......@@ -1391,6 +1392,7 @@ class DaskLGBMRegressor(LGBMRegressor, _DaskLGBMModel):
eval_metric=eval_metric,
**kwargs
)
return self
_base_doc = _lgbmmodel_doc_fit.format(
X_shape="Dask Array or Dask DataFrame of shape = [n_samples, n_features]",
......@@ -1550,7 +1552,7 @@ class DaskLGBMRanker(LGBMRanker, _DaskLGBMModel):
**kwargs: Any
) -> "DaskLGBMRanker":
"""Docstring is inherited from the lightgbm.LGBMRanker.fit."""
return self._lgb_dask_fit(
self._lgb_dask_fit(
model_factory=LGBMRanker,
X=X,
y=y,
......@@ -1566,6 +1568,7 @@ class DaskLGBMRanker(LGBMRanker, _DaskLGBMModel):
eval_at=eval_at,
**kwargs
)
return self
_base_doc = _lgbmmodel_doc_fit.format(
X_shape="Dask Array or Dask DataFrame of shape = [n_samples, n_features]",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment