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
ed0a7f2c
Unverified
Commit
ed0a7f2c
authored
Jan 31, 2023
by
IdoKendo
Committed by
GitHub
Jan 31, 2023
Browse files
[python-package] Fix mypy errors for fit() incompatible signature (#5679)
parent
9954bc42
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
python-package/lightgbm/dask.py
python-package/lightgbm/dask.py
+3
-3
python-package/lightgbm/sklearn.py
python-package/lightgbm/sklearn.py
+3
-3
No files found.
python-package/lightgbm/dask.py
View file @
ed0a7f2c
...
@@ -1161,7 +1161,7 @@ class DaskLGBMClassifier(LGBMClassifier, _DaskLGBMModel):
...
@@ -1161,7 +1161,7 @@ class DaskLGBMClassifier(LGBMClassifier, _DaskLGBMModel):
def
__getstate__
(
self
)
->
Dict
[
Any
,
Any
]:
def
__getstate__
(
self
)
->
Dict
[
Any
,
Any
]:
return
self
.
_lgb_dask_getstate
()
return
self
.
_lgb_dask_getstate
()
def
fit
(
def
fit
(
# type: ignore[override]
self
,
self
,
X
:
_DaskMatrixLike
,
X
:
_DaskMatrixLike
,
y
:
_DaskCollection
,
y
:
_DaskCollection
,
...
@@ -1349,7 +1349,7 @@ class DaskLGBMRegressor(LGBMRegressor, _DaskLGBMModel):
...
@@ -1349,7 +1349,7 @@ class DaskLGBMRegressor(LGBMRegressor, _DaskLGBMModel):
def
__getstate__
(
self
)
->
Dict
[
Any
,
Any
]:
def
__getstate__
(
self
)
->
Dict
[
Any
,
Any
]:
return
self
.
_lgb_dask_getstate
()
return
self
.
_lgb_dask_getstate
()
def
fit
(
def
fit
(
# type: ignore[override]
self
,
self
,
X
:
_DaskMatrixLike
,
X
:
_DaskMatrixLike
,
y
:
_DaskCollection
,
y
:
_DaskCollection
,
...
@@ -1518,7 +1518,7 @@ class DaskLGBMRanker(LGBMRanker, _DaskLGBMModel):
...
@@ -1518,7 +1518,7 @@ class DaskLGBMRanker(LGBMRanker, _DaskLGBMModel):
def
__getstate__
(
self
)
->
Dict
[
Any
,
Any
]:
def
__getstate__
(
self
)
->
Dict
[
Any
,
Any
]:
return
self
.
_lgb_dask_getstate
()
return
self
.
_lgb_dask_getstate
()
def
fit
(
def
fit
(
# type: ignore[override]
self
,
self
,
X
:
_DaskMatrixLike
,
X
:
_DaskMatrixLike
,
y
:
_DaskCollection
,
y
:
_DaskCollection
,
...
...
python-package/lightgbm/sklearn.py
View file @
ed0a7f2c
...
@@ -984,7 +984,7 @@ class LGBMModel(_LGBMModelBase):
...
@@ -984,7 +984,7 @@ class LGBMModel(_LGBMModelBase):
class
LGBMRegressor
(
_LGBMRegressorBase
,
LGBMModel
):
class
LGBMRegressor
(
_LGBMRegressorBase
,
LGBMModel
):
"""LightGBM regressor."""
"""LightGBM regressor."""
def
fit
(
def
fit
(
# type: ignore[override]
self
,
self
,
X
,
X
,
y
,
y
,
...
@@ -1030,7 +1030,7 @@ class LGBMRegressor(_LGBMRegressorBase, LGBMModel):
...
@@ -1030,7 +1030,7 @@ class LGBMRegressor(_LGBMRegressorBase, LGBMModel):
class
LGBMClassifier
(
_LGBMClassifierBase
,
LGBMModel
):
class
LGBMClassifier
(
_LGBMClassifierBase
,
LGBMModel
):
"""LightGBM classifier."""
"""LightGBM classifier."""
def
fit
(
def
fit
(
# type: ignore[override]
self
,
self
,
X
,
X
,
y
,
y
,
...
@@ -1191,7 +1191,7 @@ class LGBMRanker(LGBMModel):
...
@@ -1191,7 +1191,7 @@ class LGBMRanker(LGBMModel):
Please use this class mainly for training and applying ranking models in common sklearnish way.
Please use this class mainly for training and applying ranking models in common sklearnish way.
"""
"""
def
fit
(
def
fit
(
# type: ignore[override]
self
,
self
,
X
,
X
,
y
,
y
,
...
...
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