Comments (3)
Apologies for the delayed response here. I'm unable to reproduce. Did you add any workers beforehand? By default YarnCluster
creates no workers, you need to use YarnCluster.scale
or the n_workers
kwarg to add them.
In [1]: import joblib
In [2]: from dask.distributed import Client
In [3]: import dask_yarn
In [4]: cluster = dask_yarn.YarnCluster(environment='dask-yarn-py37.tar.gz', deploy_mode='local', worker_vcores=1, worker_memory='512 MiB')
19/01/07 15:20:38 INFO client.RMProxy: Connecting to ResourceManager at master.example.com/172.27.0.4:8032
19/01/07 15:20:38 INFO skein.Driver: Driver started, listening on 35025
19/01/07 15:20:39 INFO skein.Driver: Uploading application resources to hdfs://master.example.com:9000/user/testuser/.skein/application_1546627174314_0056
19/01/07 15:20:42 INFO hdfs.DFSClient: Created token for testuser: HDFS_DELEGATION_TOKEN owner=testuser@EXAMPLE.COM, renewer=yarn, realUser=, issueDate=1546874441993, maxDate=1547479241993, sequenceNumber=52, masterKeyId=4 on 172.27.0.4:9000
19/01/07 15:20:42 INFO security.TokenCache: Got dt for hdfs://master.example.com:9000; Kind: HDFS_DELEGATION_TOKEN, Service: 172.27.0.4:9000, Ident: (token for testuser: HDFS_DELEGATION_TOKEN owner=testuser@EXAMPLE.COM, renewer=yarn, realUser=, issueDate=1546874441993, maxDate=1547479241993, sequenceNumber=52, masterKeyId=4)
19/01/07 15:20:42 INFO skein.Driver: Submitting application...
19/01/07 15:20:42 INFO impl.YarnClientImpl: Submitted application application_1546627174314_0056
In [5]: client = Client(cluster)
In [6]: client.ncores() # Empty because by default we start no workers
Out[6]: {}
In [7]: cluster.scale(2) # Add some workers, note that this may take a few seconds before workers start
In [8]: client.ncores() # After waiting for workers to start
Out[8]: {'tcp://172.27.0.3:40495': 1, 'tcp://172.27.0.3:45711': 1}
In [9]: with joblib.parallel_backend('dask'):
...: results = joblib.Parallel(verbose=100)(joblib.delayed(lambda x: x**2)(x) for x in range(10))
...:
[Parallel(n_jobs=-1)]: Using backend DaskDistributedBackend with 2 concurrent workers.
[Parallel(n_jobs=-1)]: Done 1 tasks | elapsed: 0.2s
[Parallel(n_jobs=-1)]: Done 2 tasks | elapsed: 0.2s
[Parallel(n_jobs=-1)]: Done 3 tasks | elapsed: 0.2s
[Parallel(n_jobs=-1)]: Done 4 tasks | elapsed: 0.3s
[Parallel(n_jobs=-1)]: Done 5 tasks | elapsed: 0.3s
[Parallel(n_jobs=-1)]: Done 6 tasks | elapsed: 0.3s
[Parallel(n_jobs=-1)]: Done 7 tasks | elapsed: 0.3s
[Parallel(n_jobs=-1)]: Done 8 out of 10 | elapsed: 0.3s remaining: 0.1s
[Parallel(n_jobs=-1)]: Done 10 out of 10 | elapsed: 0.3s remaining: 0.0s
[Parallel(n_jobs=-1)]: Done 10 out of 10 | elapsed: 0.4s finished
In [10]: results
Out[10]: [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]
In [11]: import dask
In [12]: joblib.__version__
Out[12]: '0.13.0'
In [13]: dask.__version__
Out[13]: '1.0.0'
In [14]: dask_yarn.__version__
Out[14]: '0.5.0'
from dask-yarn.
I can confirm that if you add no workers, then the joblib backend returns without doing any computation.
In [1]: from dask.distributed import Client, LocalCluster
In [2]:
In [2]: cluster = LocalCluster(n_workers=0)
In [3]: client = Client(cluster)
In [4]: import joblib
In [5]: with joblib.parallel_backend('dask'):
...: results = joblib.Parallel(verbose=100)(joblib.delayed(lambda x: x**2)(x) for x in range(10))
...:
[Parallel(n_jobs=-1)]: Using backend DaskDistributedBackend with 0 concurrent workers.
[Parallel(n_jobs=-1)]: Done 0 out of 0 | elapsed: 0.0s finished
Perhaps this should be an error? Or should block until at least one worker is added? This would be an issue to file in joblib.
from dask-yarn.
I've filed this issue here: joblib/joblib#828
Closing, as this is a joblib bug, not one for dask-yarn.
from dask-yarn.
Related Issues (20)
- AWS EMR bootstrap script fails HOT 5
- Conda environment does not activate HOT 1
- Dask Scheduler host/port Not Written to Skein Key-Value Storage When YARN Application Restarts HOT 5
- Move default branch from "master" -> "main" HOT 1
- YarnCluster.shutdown() Won't Work on EMR, results in `concurrent.futures._base.CancelledError` HOT 1
- Verify that Read the Docs is building after master -> main HOT 7
- YarnCluster hangs HOT 11
- wait_for_workers got stuck when to create cluster but application failed on yarn HOT 3
- dask-yarn job fails with dumps_msgpack ImportError HOT 3
- register workers of scheduler are less than workers in dashborad HOT 1
- can't upload files HOT 2
- EMR 6.3.0 Bootstrap Action BOOTSTRAP_FAILURE : Python 3.9 support? HOT 3
- Application Failure When Submitting Dask-Yarn Model Inferencing Job Remotely
- FileNotFoundError: [Errno 2] No such file or directory: 'yarn' HOT 3
- Jupyter Notebook Cell Hangs after submitting job to remote EMR cluster
- distributed 2022.3.0 no more compatible with dask-yarn because of missing "status" attribute in YarnCluster HOT 7
- YarnCluster() does not initialize but runs indefinetly HOT 3
- AttributeError while running dask on amazon EMR. HOT 3
- .skein.sh: line 2: environment/bin/python: No such file or directory HOT 4
- Bootstrapping for 40min, when use the script. 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-yarn.