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
56b99d4c
Unverified
Commit
56b99d4c
authored
Jan 26, 2021
by
James Lamb
Committed by
GitHub
Jan 26, 2021
Browse files
[dask] rename _LGBMModel to _DaskLGBMModel (#3859)
parent
9f70e968
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
python-package/lightgbm/dask.py
python-package/lightgbm/dask.py
+4
-4
No files found.
python-package/lightgbm/dask.py
View file @
56b99d4c
...
...
@@ -377,7 +377,7 @@ def _predict(model, data, raw_score=False, pred_proba=False, pred_leaf=False, pr
raise
TypeError
(
'Data must be either Dask array or dataframe. Got %s.'
%
str
(
type
(
data
)))
class
_LGBMModel
:
class
_
Dask
LGBMModel
:
def
__init__
(
self
):
if
not
all
((
DASK_INSTALLED
,
PANDAS_INSTALLED
,
SKLEARN_INSTALLED
)):
raise
LightGBMError
(
'dask, pandas and scikit-learn are required for lightgbm.dask'
)
...
...
@@ -419,7 +419,7 @@ class _LGBMModel:
setattr
(
dest
,
name
,
attributes
[
name
])
class
DaskLGBMClassifier
(
LGBMClassifier
,
_LGBMModel
):
class
DaskLGBMClassifier
(
LGBMClassifier
,
_
Dask
LGBMModel
):
"""Distributed version of lightgbm.LGBMClassifier."""
def
fit
(
self
,
X
,
y
=
None
,
sample_weight
=
None
,
client
=
None
,
**
kwargs
):
...
...
@@ -467,7 +467,7 @@ class DaskLGBMClassifier(LGBMClassifier, _LGBMModel):
return
self
.
_to_local
(
LGBMClassifier
)
class
DaskLGBMRegressor
(
LGBMRegressor
,
_LGBMModel
):
class
DaskLGBMRegressor
(
LGBMRegressor
,
_
Dask
LGBMModel
):
"""Docstring is inherited from the lightgbm.LGBMRegressor."""
def
fit
(
self
,
X
,
y
=
None
,
sample_weight
=
None
,
client
=
None
,
**
kwargs
):
...
...
@@ -503,7 +503,7 @@ class DaskLGBMRegressor(LGBMRegressor, _LGBMModel):
return
self
.
_to_local
(
LGBMRegressor
)
class
DaskLGBMRanker
(
LGBMRanker
,
_LGBMModel
):
class
DaskLGBMRanker
(
LGBMRanker
,
_
Dask
LGBMModel
):
"""Docstring is inherited from the lightgbm.LGBMRanker."""
def
fit
(
self
,
X
,
y
=
None
,
sample_weight
=
None
,
init_score
=
None
,
group
=
None
,
client
=
None
,
**
kwargs
):
...
...
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