Skip to content

Commit

Permalink
fix path
Browse files Browse the repository at this point in the history
  • Loading branch information
StrikerRUS committed Mar 12, 2021
1 parent 841990c commit cf324d2
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 2 deletions.
5 changes: 5 additions & 0 deletions examples/python-guide/dask/binary-classification.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import sys

import dask.array as da
from distributed import Client, LocalCluster
from sklearn.datasets import make_blobs

import lightgbm as lgb

if __name__ == "__main__":
if not sys.platform.startswith('linux'):
print('lightgbm.dask is currently supported in Linux environments')
sys.exit(0)

print("loading data")

Expand Down
5 changes: 5 additions & 0 deletions examples/python-guide/dask/multiclass-classification.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import sys

import dask.array as da
from distributed import Client, LocalCluster
from sklearn.datasets import make_blobs

import lightgbm as lgb

if __name__ == "__main__":
if not sys.platform.startswith('linux'):
print('lightgbm.dask is currently supported in Linux environments')
sys.exit(0)

print("loading data")

Expand Down
5 changes: 5 additions & 0 deletions examples/python-guide/dask/prediction.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import sys

import dask.array as da
from distributed import Client, LocalCluster
from sklearn.datasets import make_regression
Expand All @@ -6,6 +8,9 @@
import lightgbm as lgb

if __name__ == "__main__":
if not sys.platform.startswith('linux'):
print('lightgbm.dask is currently supported in Linux environments')
sys.exit(0)

print("loading data")

Expand Down
12 changes: 10 additions & 2 deletions examples/python-guide/dask/ranking.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import os
import sys

import dask.array as da
import numpy as np
from distributed import Client, LocalCluster
Expand All @@ -6,11 +9,16 @@
import lightgbm as lgb

if __name__ == "__main__":
if not sys.platform.startswith('linux'):
print('lightgbm.dask is currently supported in Linux environments')
sys.exit(0)

print("loading data")

X, y = load_svmlight_file("../lambdarank/rank.train")
group = np.loadtxt("../lambdarank/rank.train.query")
X, y = load_svmlight_file(os.path.join(os.path.dirname(os.path.realpath(__file__)),
'../../lambdarank/rank.train'))
group = np.loadtxt(os.path.join(os.path.dirname(os.path.realpath(__file__)),
'../../lambdarank/rank.train.query'))

print("initializing a Dask cluster")

Expand Down
5 changes: 5 additions & 0 deletions examples/python-guide/dask/regression.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import sys

import dask.array as da
from distributed import Client, LocalCluster
from sklearn.datasets import make_regression

import lightgbm as lgb

if __name__ == "__main__":
if not sys.platform.startswith('linux'):
print('lightgbm.dask is currently supported in Linux environments')
sys.exit(0)

print("loading data")

Expand Down

0 comments on commit cf324d2

Please sign in to comment.