Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
709ea4ca
Unverified
Commit
709ea4ca
authored
Mar 02, 2023
by
James Lamb
Committed by
GitHub
Mar 02, 2023
Browse files
[python-package] [dask] fix mypy errors about Dask fit() return types (#5756)
parent
e4231205
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
python-package/lightgbm/dask.py
python-package/lightgbm/dask.py
+6
-3
No files found.
python-package/lightgbm/dask.py
View file @
709ea4ca
...
@@ -1175,7 +1175,7 @@ class DaskLGBMClassifier(LGBMClassifier, _DaskLGBMModel):
...
@@ -1175,7 +1175,7 @@ class DaskLGBMClassifier(LGBMClassifier, _DaskLGBMModel):
**
kwargs
:
Any
**
kwargs
:
Any
)
->
"DaskLGBMClassifier"
:
)
->
"DaskLGBMClassifier"
:
"""Docstring is inherited from the lightgbm.LGBMClassifier.fit."""
"""Docstring is inherited from the lightgbm.LGBMClassifier.fit."""
return
self
.
_lgb_dask_fit
(
self
.
_lgb_dask_fit
(
model_factory
=
LGBMClassifier
,
model_factory
=
LGBMClassifier
,
X
=
X
,
X
=
X
,
y
=
y
,
y
=
y
,
...
@@ -1189,6 +1189,7 @@ class DaskLGBMClassifier(LGBMClassifier, _DaskLGBMModel):
...
@@ -1189,6 +1189,7 @@ class DaskLGBMClassifier(LGBMClassifier, _DaskLGBMModel):
eval_metric
=
eval_metric
,
eval_metric
=
eval_metric
,
**
kwargs
**
kwargs
)
)
return
self
_base_doc
=
_lgbmmodel_doc_fit
.
format
(
_base_doc
=
_lgbmmodel_doc_fit
.
format
(
X_shape
=
"Dask Array or Dask DataFrame of shape = [n_samples, n_features]"
,
X_shape
=
"Dask Array or Dask DataFrame of shape = [n_samples, n_features]"
,
...
@@ -1378,7 +1379,7 @@ class DaskLGBMRegressor(LGBMRegressor, _DaskLGBMModel):
...
@@ -1378,7 +1379,7 @@ class DaskLGBMRegressor(LGBMRegressor, _DaskLGBMModel):
**
kwargs
:
Any
**
kwargs
:
Any
)
->
"DaskLGBMRegressor"
:
)
->
"DaskLGBMRegressor"
:
"""Docstring is inherited from the lightgbm.LGBMRegressor.fit."""
"""Docstring is inherited from the lightgbm.LGBMRegressor.fit."""
return
self
.
_lgb_dask_fit
(
self
.
_lgb_dask_fit
(
model_factory
=
LGBMRegressor
,
model_factory
=
LGBMRegressor
,
X
=
X
,
X
=
X
,
y
=
y
,
y
=
y
,
...
@@ -1391,6 +1392,7 @@ class DaskLGBMRegressor(LGBMRegressor, _DaskLGBMModel):
...
@@ -1391,6 +1392,7 @@ class DaskLGBMRegressor(LGBMRegressor, _DaskLGBMModel):
eval_metric
=
eval_metric
,
eval_metric
=
eval_metric
,
**
kwargs
**
kwargs
)
)
return
self
_base_doc
=
_lgbmmodel_doc_fit
.
format
(
_base_doc
=
_lgbmmodel_doc_fit
.
format
(
X_shape
=
"Dask Array or Dask DataFrame of shape = [n_samples, n_features]"
,
X_shape
=
"Dask Array or Dask DataFrame of shape = [n_samples, n_features]"
,
...
@@ -1550,7 +1552,7 @@ class DaskLGBMRanker(LGBMRanker, _DaskLGBMModel):
...
@@ -1550,7 +1552,7 @@ class DaskLGBMRanker(LGBMRanker, _DaskLGBMModel):
**
kwargs
:
Any
**
kwargs
:
Any
)
->
"DaskLGBMRanker"
:
)
->
"DaskLGBMRanker"
:
"""Docstring is inherited from the lightgbm.LGBMRanker.fit."""
"""Docstring is inherited from the lightgbm.LGBMRanker.fit."""
return
self
.
_lgb_dask_fit
(
self
.
_lgb_dask_fit
(
model_factory
=
LGBMRanker
,
model_factory
=
LGBMRanker
,
X
=
X
,
X
=
X
,
y
=
y
,
y
=
y
,
...
@@ -1566,6 +1568,7 @@ class DaskLGBMRanker(LGBMRanker, _DaskLGBMModel):
...
@@ -1566,6 +1568,7 @@ class DaskLGBMRanker(LGBMRanker, _DaskLGBMModel):
eval_at
=
eval_at
,
eval_at
=
eval_at
,
**
kwargs
**
kwargs
)
)
return
self
_base_doc
=
_lgbmmodel_doc_fit
.
format
(
_base_doc
=
_lgbmmodel_doc_fit
.
format
(
X_shape
=
"Dask Array or Dask DataFrame of shape = [n_samples, n_features]"
,
X_shape
=
"Dask Array or Dask DataFrame of shape = [n_samples, n_features]"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment