Skip to content

Commit

Permalink
Update parallel_python.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ktiits authored Sep 5, 2024
1 parent 95043e6 commit 03d36ad
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions materials/parallel_python.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,13 @@ When using Dask, two main decisions have to be made for running code in parallel

While developing the code, it might be good to start with default scheduler or `LocalCluster` parallelization and then if needed change it to `SLURMCluster`. The required changes to code are small, when changing the parallelization set-up.

One of the advantages of using LocalCluster, is that then in Jupyter the [Dask-extension](https://github.com/dask/dask-labextension) is able to show progress and resource usage.
One of the advantages of using `LocalCluster`, is that then in Jupyter the [Dask-extension](https://github.com/dask/dask-labextension) is able to show progress and resource usage.

**Default scheduler** is started automatically, when Dask objects or functions are used.

**LocalCluster**, with default settings:
**LocalCluster**
```
# With default settings
from dask.distributed import Client
client = Client()
Expand All @@ -72,7 +73,7 @@ no_of_workers = len(os.sched_getaffinity(0))
client = Client(n_workers=no_of_workers)
```

**SLURMCluster:
**SLURMCluster**:
```
from dask_jobqueue import SLURMCluster
Expand Down

0 comments on commit 03d36ad

Please sign in to comment.