Skip to content

Commit

Permalink
Merge branch '6676_port_generative_losses' of github.com:marksgraham/…
Browse files Browse the repository at this point in the history
…MONAI into 6676_port_generative_losses
  • Loading branch information
marksgraham committed Aug 2, 2023
2 parents a4e16c8 + 6260984 commit 569e4e2
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 569e4e2

Please sign in to comment.