From 80ff878ca6c5dcc0b9b471975144818bc1f2e83e Mon Sep 17 00:00:00 2001 From: Martin Durant Date: Thu, 19 Oct 2023 13:18:36 -0400 Subject: [PATCH] Reduce dask tokenization time --- xarray/core/dataset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xarray/core/dataset.py b/xarray/core/dataset.py index 2ff78fb0484..2cc081a5a6e 100644 --- a/xarray/core/dataset.py +++ b/xarray/core/dataset.py @@ -309,7 +309,7 @@ def _maybe_chunk( # when rechunking by different amounts, make sure dask names change # by providing chunks as an input to tokenize. # subtle bugs result otherwise. see GH3350 - token2 = tokenize(name, token if token else var._data, chunks) + token2 = tokenize(token if token else var._data, str(chunks)) name2 = f"{name_prefix}{name}-{token2}" from_array_kwargs = utils.consolidate_dask_from_array_kwargs(