Skip to content

Commit

Permalink
Change "auto" behaviour for dask mode
Browse files Browse the repository at this point in the history
If driver exposes dask_reader default mode to
"concurrency".
  • Loading branch information
Kirill888 committed Jun 25, 2024
1 parent fc278b3 commit 70a8e20
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions odc/loader/_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,11 @@ def __init__(
chunks = {**chunks}
chunks.update(dict(zip(["time", "y", "x"], chunk_tyx)))
if mode == "auto":
# "mem" unless overwriten by env var
mode = _default_dask_mode()
if rdr.dask_reader is not None:
mode = "concurrency"
else:
# "mem" unless overwritten by env var
mode = _default_dask_mode()

self.cfg = cfg
self.template = template
Expand Down

0 comments on commit 70a8e20

Please sign in to comment.