Skip to content

Commit

Permalink
FIX: Add dask config single-threaded to build catalog from timeseries (
Browse files Browse the repository at this point in the history
…#559)

* FIX: Add dask config single-threaded to build catalog from timeseries

* change to minus one for njobs
  • Loading branch information
mgrover1 authored Jan 13, 2023
1 parent d4cfcb4 commit a2e1430
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/source/how-to/build-a-catalog-from-timeseries-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,12 @@ The only parts of ecgtools we need are the `Builder` object and the `parse_cesm_
```{code-cell} ipython3
import pathlib
import dask
import intake
from ecgtools import Builder
from ecgtools.parsers.cesm import parse_cesm_timeseries
dask.config.set(scheduler='single-threaded')
```

## Understanding the directory structure
Expand Down Expand Up @@ -90,7 +93,7 @@ cat_builder = Builder(
# Exclude the timeseries and restart directories
exclude_patterns=["*/tseries/*", "*/rest/*"],
# Number of jobs to execute - should be equal to # threads you are using
joblib_parallel_kwargs={'n_jobs': 5},
joblib_parallel_kwargs={'n_jobs': -1},
)
cat_builder
Expand Down

0 comments on commit a2e1430

Please sign in to comment.