Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
pylint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
stu1130 committed May 20, 2019
1 parent c1618a1 commit 5849de0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/mxnet/gluon/contrib/estimator/event_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ def train_begin(self, estimator, *args, **kwargs):
self.current_epoch = 0
self.current_batch = 0
if self.save_best:
self.best = np.Inf if self.monitor_op == np.less else -np.Inf
self.best = np.Inf if self.monitor_op == np.less else -np.Inf # pylint: disable=comparison-with-callable
if self.resume_from_checkpoint:
error_msg = "To use resume from checkpoint, you must only specify " \
"the same type of period you used for training." \
Expand Down Expand Up @@ -666,7 +666,7 @@ def __init__(self,
"if you want otherwise", self.monitor.get()[0])
self.monitor_op = np.less

if self.monitor_op == np.greater:
if self.monitor_op == np.greater: # pylint: disable=comparison-with-callable
self.min_delta *= 1
else:
self.min_delta *= -1
Expand All @@ -679,7 +679,7 @@ def train_begin(self, estimator, *args, **kwargs):
if self.baseline is not None:
self.best = self.baseline
else:
self.best = np.Inf if self.monitor_op == np.less else -np.Inf
self.best = np.Inf if self.monitor_op == np.less else -np.Inf # pylint: disable=comparison-with-callable

def epoch_end(self, estimator, *args, **kwargs):
monitor_name, monitor_value = self.monitor.get()
Expand Down

0 comments on commit 5849de0

Please sign in to comment.