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
4007b34f
Unverified
Commit
4007b34f
authored
Jan 19, 2021
by
James Lamb
Committed by
GitHub
Jan 19, 2021
Browse files
[dask] fix Dask import order (#3788)
parent
a2927664
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
python-package/lightgbm/dask.py
python-package/lightgbm/dask.py
+2
-2
tests/python_package_test/test_dask.py
tests/python_package_test/test_dask.py
+2
-2
No files found.
python-package/lightgbm/dask.py
View file @
4007b34f
...
@@ -12,6 +12,8 @@ from urllib.parse import urlparse
...
@@ -12,6 +12,8 @@ from urllib.parse import urlparse
import
numpy
as
np
import
numpy
as
np
import
pandas
as
pd
import
pandas
as
pd
import
scipy.sparse
as
ss
from
dask
import
array
as
da
from
dask
import
array
as
da
from
dask
import
dataframe
as
dd
from
dask
import
dataframe
as
dd
from
dask
import
delayed
from
dask
import
delayed
...
@@ -20,8 +22,6 @@ from dask.distributed import Client, default_client, get_worker, wait
...
@@ -20,8 +22,6 @@ from dask.distributed import Client, default_client, get_worker, wait
from
.basic
import
_LIB
,
_safe_call
from
.basic
import
_LIB
,
_safe_call
from
.sklearn
import
LGBMClassifier
,
LGBMRegressor
from
.sklearn
import
LGBMClassifier
,
LGBMRegressor
import
scipy.sparse
as
ss
logger
=
logging
.
getLogger
(
__name__
)
logger
=
logging
.
getLogger
(
__name__
)
...
...
tests/python_package_test/test_dask.py
View file @
4007b34f
...
@@ -109,7 +109,7 @@ def test_training_does_not_fail_on_port_conflicts(client):
...
@@ -109,7 +109,7 @@ def test_training_does_not_fail_on_port_conflicts(client):
n_estimators
=
5
,
n_estimators
=
5
,
num_leaves
=
5
num_leaves
=
5
)
)
for
i
in
range
(
5
):
for
_
in
range
(
5
):
dask_classifier
.
fit
(
dask_classifier
.
fit
(
X
=
dX
,
X
=
dX
,
y
=
dy
,
y
=
dy
,
...
@@ -204,7 +204,7 @@ def test_regressor_quantile(output, client, listen_port, alpha):
...
@@ -204,7 +204,7 @@ def test_regressor_quantile(output, client, listen_port, alpha):
def
test_regressor_local_predict
(
client
,
listen_port
):
def
test_regressor_local_predict
(
client
,
listen_port
):
X
,
y
,
w
,
dX
,
dy
,
dw
=
_create_data
(
'regression'
,
output
=
'array'
)
X
,
y
,
_
,
dX
,
dy
,
dw
=
_create_data
(
'regression'
,
output
=
'array'
)
dask_regressor
=
dlgbm
.
DaskLGBMRegressor
(
dask_regressor
=
dlgbm
.
DaskLGBMRegressor
(
local_listen_port
=
listen_port
,
local_listen_port
=
listen_port
,
...
...
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