Skip to content

Commit

Permalink
auto updates (#6803)
Browse files Browse the repository at this point in the history
Signed-off-by: monai-bot <monai.miccai2019@gmail.com>

Signed-off-by: monai-bot <monai.miccai2019@gmail.com>
  • Loading branch information
monai-bot authored Jul 31, 2023
1 parent c4ff70b commit 4c22a27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions monai/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -1600,7 +1600,7 @@ def _cachecheck(self, item_transformed):
if hashfile is not None and hashfile.is_file(): # cache hit
with cp.cuda.Device(self.device):
if isinstance(item_transformed, dict):
item: dict[Any, Any] = {} # type:ignore
item: dict[Any, Any] = {}
for k in item_transformed:
meta_k = self._load_meta_cache(meta_hash_file_name=f"{hashfile.name}-{k}-meta")
item[k] = kvikio_numpy.fromfile(f"{hashfile}-{k}", dtype=meta_k["dtype"], like=cp.empty(()))
Expand Down Expand Up @@ -1688,4 +1688,4 @@ def _load_meta_cache(self, meta_hash_file_name):
if meta_hash_file_name in self._meta_cache:
return self._meta_cache[meta_hash_file_name]
else:
return torch.load(self.cache_dir / meta_hash_file_name) # type:ignore
return torch.load(self.cache_dir / meta_hash_file_name)

0 comments on commit 4c22a27

Please sign in to comment.