File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 20
20
import dask .local
21
21
import fsspec
22
22
import numcodecs .abc
23
+ import numcodecs .blosc
23
24
import numpy
24
25
import zarr
25
26
39
40
#: Module logger.
40
41
_LOGGER : logging .Logger = logging .getLogger (__name__ )
41
42
43
+ #: Disable multithreading in Blosc to avoid competing with Dask.
44
+ numcodecs .blosc .use_threads = False
45
+
42
46
43
47
def execute_transaction (
44
48
client : dask .distributed .Client ,
@@ -247,13 +251,16 @@ def write_zarr_group(
247
251
futures : list [Any ] = client .map (
248
252
write_zarr_variable ,
249
253
iterables ,
250
- batch_size = 64 ,
251
254
block_size_limit = zds .block_size_limit ,
252
255
chunks = zds .chunks ,
253
256
dirname = dirname ,
254
257
fs = fs ,
255
258
)
256
- execute_transaction (client , sync .NoSync (), futures )
259
+ execute_transaction (
260
+ client ,
261
+ sync .NoSync (),
262
+ futures ,
263
+ workers = dask .distributed .get_worker ().address )
257
264
else :
258
265
tuple (
259
266
map (
You can’t perform that action at this time.
0 commit comments