Skip to content

Commit

Permalink
Merge remote-tracking branch 'yliu/fix-zarr' into fix-zarr
Browse files Browse the repository at this point in the history
  • Loading branch information
KumoLiu committed Jan 24, 2025
2 parents 0355bfb + de054da commit 26a8a32
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions monai/inferers/merger.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,16 +249,17 @@ def __init__(
self.store = store
if version_geq(get_package_version("zarr"), "3.0.0"):
if value_store is None:
tmpdir = TemporaryDirectory()
self.value_store = zarr.storage.LocalStore(tmpdir.name)
self.tmpdir = TemporaryDirectory()
self.value_store = zarr.storage.LocalStore(self.tmpdir.name)
else:
self.value_store = value_store
if count_store is None:
tmpdir = TemporaryDirectory()
self.count_store = zarr.storage.LocalStore(tmpdir.name)
self.tmpdir = TemporaryDirectory()
self.count_store = zarr.storage.LocalStore(self.tmpdir.name)
else:
self.count_store = count_store
else:
self.tmpdir = None
self.value_store = zarr.storage.TempStore() if value_store is None else value_store
self.count_store = zarr.storage.TempStore() if count_store is None else count_store
self.chunks = chunks
Expand Down

0 comments on commit 26a8a32

Please sign in to comment.