dask chunking tutorial outline

Open
#157 3 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale

Research direction

Review the linked Dask chunking resources and the repository's existing tutorial structure first; no target file is named in the issue. Done means an intermediate Xarray-user tutorial covers chunk-size effects, monitoring chunks and tasks, rechunking cost, and read-time versus storage chunk choices, including the proposed examples and images.

Written by the indexing model from the issue text.

Description

enhancement

from the pangeo working meeting discussion with @mgrover1 @jmunroe @norlandrhagen

Here's an outline for an intermediate tutorial talking about dask chunking specifically for Xarray users


Motivation: why care about chunk size?
Keeping track
  • monitoring chunk sizes and num tasks throughout the pipeline using the repr
    • use some images
  • while output blocks may be small (say after a big reduction), intermediate blocks need not be.
  • So keep monitoring chunksizes (and tasks) throughout the pipeline.
Why is it important to choose appropriate chunks early in the pipeline?
  • Demonstrate that rechunking is not cheap in most cases
Specify chunks when reading data
  1. Avoid chunks="auto".
  2. Specifying chunks during data read
    • open_dataset
    • open_mfdataset
  3. Analysis vs storage chunks:
    • Dask chunks should be a multiple of chunks on disk
    • talk about aligning chunks with files stored on disk
    • @djhoese example
Dominant language
Jupyter Notebook
Stars
204
Forks
121
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from xarray-contrib/xarray-tutorial

All issues in xarray-contrib/xarray-tutorial

Similar issues

More Data Engineering issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.