class_docstr: Class to implement the early stopping mechanism.
  The optimization process is stopped when the performance does not
  improve for a threshold number of consecutive epochs. The performance
  is considered to have improved when the change is more than a given
  threshold (epsilon).
class_docstr_tok: ["Class","to","implement","the","early","stopping","mechanism",".","The","optimization","process","is","stopped","when","the","performance","does","not","improve","for","a","threshold","number","of","consecutive","epochs",".","The","performance","is","considered","to","have","improved","when","the","change","is","more","than","a","given","threshold","(","epsilon",")","."]
code: def __init__(
      self,
      max_epochs_without_improvement: int,
      epsilon: float,
      minimize: bool,
  ):
      self.max_epochs_without_improvement = (
          max_epochs_without_improvement
      )
      self.epsilon = epsilon
      self.minimize = minimize
      self.current_best_value: Optional[float] = None
      self.current_epochs_without_improvement = 0
  
imports: import logging
  from typing import Optional
  from ax import ParameterType
label_desc: Use image node_id 1 to create a new EarlyStopper object  with example: obj = EarlyStopper(max_epochs_without_improvement, epsilon, minimize)