Skip to content

Commit

Permalink
1014 learning rate finder (#1454)
Browse files Browse the repository at this point in the history
learning rate finder and corresponding test
  • Loading branch information
rijobro authored Jan 26, 2021
1 parent db8f787 commit a2da8a1
Show file tree
Hide file tree
Showing 10 changed files with 868 additions and 3 deletions.
8 changes: 7 additions & 1 deletion monai/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,13 @@ def _fill_cache(self) -> List:
warnings.warn("tqdm is not installed, will not show the caching progress bar.")
with ThreadPool(self.num_workers) as p:
if has_tqdm:
return list(tqdm(p.imap(self._load_cache_item, range(self.cache_num)), total=self.cache_num))
return list(
tqdm(
p.imap(self._load_cache_item, range(self.cache_num)),
total=self.cache_num,
desc="Loading dataset",
)
)
return list(p.imap(self._load_cache_item, range(self.cache_num)))

def _load_cache_item(self, idx: int):
Expand Down
2 changes: 1 addition & 1 deletion monai/handlers/stats_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
DEFAULT_TAG = "Loss"


class StatsHandler(object):
class StatsHandler:
"""
StatsHandler defines a set of Ignite Event-handlers for all the log printing logics.
It's can be used for any Ignite Engine(trainer, validator and evaluator).
Expand Down
1 change: 1 addition & 0 deletions monai/optimizers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from .lr_finder import LearningRateFinder
from .novograd import Novograd
from .utils import generate_param_groups
Loading

0 comments on commit a2da8a1

Please sign in to comment.