Skip to content

Commit

Permalink
* moved threshold_checker to the last argument in CallbackMonitor
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyToluna committed Sep 15, 2022
1 parent c44c8bf commit 58d5673
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lpd/callbacks/callback_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ class CallbackMonitor:
monitor_mode - e.g. lpd.enums.MonitorMode.MIN, min wothh check if the metric decreased, MAX will check for increase
metric_name - in case of monitor_mode=lpd.enums.MonitorMode.METRIC, provide metric_name, otherwise, leave it None
"""
def __init__(self, monitor_type: MonitorType, stats_type: StatsType, monitor_mode: MonitorMode,
threshold_checker: Optional[ThresholdChecker] = None, patience: int=None, metric_name: Optional[str]=None):
def __init__(self, monitor_type: MonitorType,
stats_type: StatsType,
monitor_mode: MonitorMode,
patience: int=None,
metric_name: Optional[str]=None,
threshold_checker: Optional[ThresholdChecker] = None):
self.patience = inf if patience is None or patience < 0 else patience
self.patience_countdown = self.patience
self.monitor_type = monitor_type
Expand Down

0 comments on commit 58d5673

Please sign in to comment.