From 09aff105a0f69a3d3ea32ae32ad1fe5b3a5e675c Mon Sep 17 00:00:00 2001 From: Nic Ma Date: Thu, 25 Feb 2021 22:22:32 +0800 Subject: [PATCH] [DLMED] add progress arg Signed-off-by: Nic Ma --- monai/data/dataset.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monai/data/dataset.py b/monai/data/dataset.py index b93f03151f..db1ecc2b1f 100644 --- a/monai/data/dataset.py +++ b/monai/data/dataset.py @@ -591,6 +591,7 @@ def __init__( cache_rate: float = 1.0, num_init_workers: Optional[int] = None, num_replace_workers: int = 0, + progress: bool = True, ) -> None: """ Args: @@ -605,8 +606,10 @@ def __init__( If num_init_workers is None then the number returned by os.cpu_count() is used. num_replace_workers: the number of worker threads to prepare the replacement cache for every epoch. if 0, run in main thread, no separate thread will open. + progress: whether to display a progress bar. + """ - super().__init__(data, transform, cache_num, cache_rate, num_init_workers) + super().__init__(data, transform, cache_num, cache_rate, num_init_workers, progress) if self._cache is None: self._cache = self._fill_cache() if self.cache_num >= len(data):