Skip to content

Commit

Permalink
remove unused import
Browse files Browse the repository at this point in the history
Signed-off-by: KumoLiu <[email protected]>
  • Loading branch information
KumoLiu committed Nov 10, 2023
1 parent 06effe5 commit 1bb1ae7
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions monai/data/grid_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@
else:
tqdm, has_tqdm = optional_import("tqdm", "4.47.0", min_version, "tqdm")

cp, _ = optional_import("cupy")
lmdb, _ = optional_import("lmdb")
pd, _ = optional_import("pandas")
kvikio_numpy, _ = optional_import("kvikio.numpy")

__all__ = ["PatchDataset", "GridPatchDataset", "PatchIter", "PatchIterd"]


Expand Down Expand Up @@ -332,7 +327,9 @@ def __iter__(self):
yield from self._generate_patches(self.patch_iter(image))
else:
if self._cache is None:
raise RuntimeError("Cache buffer is not initialized, please call `set_data()` before epoch begins.")
raise RuntimeError(
"Cache buffer is not initialized, please call `set_data()` before epoch begins."
)
data = self._cache[cache_index] # type: ignore
other = self._cache_other[cache_index] # type: ignore

Expand Down

0 comments on commit 1bb1ae7

Please sign in to comment.