Skip to content

Commit

Permalink
Merge branch 'dev' into 6676_port_generative_losses
Browse files Browse the repository at this point in the history
  • Loading branch information
wyli authored Jul 31, 2023
2 parents f8f1a3f + 4c22a27 commit 6260984
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 6260984

Please sign in to comment.