Skip to content

Commit a2da8a1

Browse files
authored
1014 learning rate finder (#1454)
learning rate finder and corresponding test
1 parent db8f787 commit a2da8a1

File tree

10 files changed

+868
-3
lines changed

10 files changed

+868
-3
lines changed

monai/data/dataset.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,13 @@ def _fill_cache(self) -> List:
498498
warnings.warn("tqdm is not installed, will not show the caching progress bar.")
499499
with ThreadPool(self.num_workers) as p:
500500
if has_tqdm:
501-
return list(tqdm(p.imap(self._load_cache_item, range(self.cache_num)), total=self.cache_num))
501+
return list(
502+
tqdm(
503+
p.imap(self._load_cache_item, range(self.cache_num)),
504+
total=self.cache_num,
505+
desc="Loading dataset",
506+
)
507+
)
502508
return list(p.imap(self._load_cache_item, range(self.cache_num)))
503509

504510
def _load_cache_item(self, idx: int):

monai/handlers/stats_handler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
DEFAULT_TAG = "Loss"
2828

2929

30-
class StatsHandler(object):
30+
class StatsHandler:
3131
"""
3232
StatsHandler defines a set of Ignite Event-handlers for all the log printing logics.
3333
It's can be used for any Ignite Engine(trainer, validator and evaluator).

monai/optimizers/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
# See the License for the specific language governing permissions and
1010
# limitations under the License.
1111

12+
from .lr_finder import LearningRateFinder
1213
from .novograd import Novograd
1314
from .utils import generate_param_groups

0 commit comments

Comments
 (0)