Comments (5)
Can you provide a reproducible example of a failure? This succeeds
import dask.array as da
import sklearn.datasets
import sklearn.cluster
from sklearn.externals import joblib
from distributed import Client
from distributed import Client
client = Client()
X, y = sklearn.datasets.make_blobs()
model = sklearn.cluster.DBSCAN(eps=0.5, min_samples=3)
with joblib.parallel_backend("dask"):
model.fit(X)
from dask-tutorial.
from dask.distributed import Client
from sklearn.externals.joblib import parallel_backend
from sklearn.datasets import make_blobs
from sklearn.cluster import DBSCAN
import datetime
if __name__ == '__main__':
X, y = make_blobs(n_samples = 150000, n_features = 2, centers = 3, cluster_std = 2.1)
client = Client()
now = datetime.datetime.now()
model = DBSCAN(eps = 0.5, min_samples = 30)
with parallel_backend('dask'):
model.fit(X)
print(datetime.datetime.now() - now)
Below is my output
distributed.worker - WARNING - Compute Failed
Function: <sklearn.externals.joblib._dask.Batch object at 0x7f884869b1d0>
args: (array([[ 3.12448708, -4.43752312],
[ 4.89858449, -3.96334534],
[-9.70246128, 7.82301076],
...,
[ 6.25643046, -3.93627323],
[10.77439621, -5.29284763],
[-7.0445401 , 11.64406627]]))
kwargs: {}
Exception: TimeoutError('Timeout',)
and I had to stop the program manually (with crtl + C). Am I doing it wrong !
And the code you mentioned above fails to work in windows. I tried the same code on linux it was fine. Does it have anything to do with OS too !
from dask-tutorial.
Worked for me
In [1]: from dask.distributed import Client
...: from sklearn.externals.joblib import parallel_backend
...: from sklearn.datasets import make_blobs
...: from sklearn.cluster import DBSCAN
...:
In [2]: import datetime
...:
In [3]: X, y = make_blobs(n_samples = 150000, n_features = 2, centers = 3, c
...: luster_std = 2.1)
...:
...: client = Client()
...: now = datetime.datetime.now()
...: model = DBSCAN(eps = 0.5, min_samples = 30)
...: with parallel_backend('dask'):
...: model.fit(X)
...: print(datetime.datetime.now() - now)
...:
0:00:12.678909
You might try updating versions of scikit learn, dask, and distributed to see if that helps
from dask-tutorial.
Hi @mrocklin
I tried to run exactly the same code with you. But It just kept running a very long time and I shut it down. Do you think what is the problem?
from dask-tutorial.
Hard to say in the abstract. You might try increasing the verbosity on the sklearn estimator and looking at the logs
from dask-tutorial.
Related Issues (20)
- Move default branch from "master" -> "main" HOT 8
- Update binder badge image HOT 1
- Build failing
- Missing Data HOT 3
- 02_bag groupby vs foldby example fails due to known bug HOT 1
- 03_array Exercise: Subsample and store should hint you to use `to_zarr` HOT 2
- Tutorial revision + Spanish translation HOT 3
- 01_dask.delayed.ipynb dask.delayed parallelization section does not have a filenames variable declared HOT 2
- Tutorial notebooks should direct questions to dicourse, not gitter HOT 1
- Check dask-labextension is available HOT 1
- solution in 04_dataframe parts 5 and 6 should use idxmax HOT 1
- 03_array Lennard Jones potential - NameError: name 'potential' is not defined HOT 1
- 01_dask.delayed Sequential code: Mean Departure Delay Per Airport returns NaN value HOT 1
- 07_dataframe_storage example fails to read parquet data back in HOT 5
- Some notebooks still using old logo HOT 7
- Fix dashboard link on binder HOT 1
- Use ReadTheDocs for PR previews
- Add new notebook for diagnostic tools
- Set up JLab workspace with task stream and progress bar set up HOT 3
- Binder error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dask-tutorial.