Skip to content

Commit

Permalink
added documentation for threshold_checker in CallbackMonitor
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyToluna committed Sep 15, 2022
1 parent 58d5673 commit fbfce42
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lpd/callbacks/callback_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ class CallbackMonitor:
stats_type - e.g lpd.enums.StatsType.VAL
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
threshold_checker - to check if the criteria was met, if None, AbsoluteThresholdChecker with threshold=0.0 will be used
"""
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):
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 fbfce42

Please sign in to comment.