class_docstr: Callback to stop training when a monitored quantity has stopped improving.
  
  Example: ::
  
      >>> from torchbearer import Trial
      >>> from torchbearer.callbacks import EarlyStopping
  
      # Example Trial which does early stopping if the validation accuracy drops below the max seen for 5 epochs in a row
      >>> stopping = EarlyStopping(monitor='val_acc', patience=5, mode='max')
      >>> trial = Trial(None, callbacks=[stopping], metrics=['acc'])
  
  Args:
      monitor (str): Name of quantity in metrics to be monitored
      min_delta (float): Minimum change in the monitored quantity to qualify as an improvement, i.e. an absolute
          change of less than min_delta, will count as no improvement.
      patience (int): Number of epochs with no improvement after which training will be stopped.
      mode (str): One of {auto, min, max}. In `min` mode, training will stop when the quantity monitored has stopped
          decreasing; in `max` mode it will stop when the quantity monitored has stopped increasing; in `auto` mode,
          the direction is automatically inferred from the name of the monitored quantity.
  
  State Requirements:
      - :attr:`torchbearer.state.METRICS`: Metrics should be a dict containing the given monitor key as a minimum
class_docstr_tok: ["Callback","to","stop","training","when","a","monitored","quantity","has","stopped","improving",".","Example",":",":",":",">",">",">","from","torchbearer","import","Trial",">",">",">","from","torchbearer.callbacks","import","EarlyStopping","#","Example","Trial","which","does","early","stopping","if","the","validation","accuracy","drops","below","the","max","seen","for","5","epochs","in","a","row",">",">",">","stopping","=","EarlyStopping","(","monitor='val_acc","'",",","patience=5",",","mode='max","'",")",">",">",">","trial","=","Trial","(","None",",","callbacks=","[","stopping","]",",","metrics=","[","'acc","'","]",")","Args",":","monitor","(","str",")",":","Name","of","quantity","in","metrics","to","be","monitored","min_delta","(","float",")",":","Minimum","change","in","the","monitored","quantity","to","qualify","as","an","improvement",",","i.e",".","an","absolute","change","of","less","than","min_delta",",","will","count","as","no","improvement",".","patience","(","int",")",":","Number","of","epochs","with","no","improvement","after","which","training","will","be","stopped",".","mode","(","str",")",":","One","of","{","auto",",","min",",","max","}",".","In","`","min","`","mode",",","training","will","stop","when","the","quantity","monitored","has","stopped","decreasing",";","in","`","max","`","mode","it","will","stop","when","the","quantity","monitored","has","stopped","increasing",";","in","`","auto","`","mode",",","the","direction","is","automatically","inferred","from","the","name","of","the","monitored","quantity",".","State","Requirements",":","-",":","attr",":","`","torchbearer.state.METRICS","`",":","Metrics","should","be","a","dict","containing","the","given","monitor","key","as","a","minimum"]
code: def on_end_epoch(self, state):
      self.step(state)
  
file_path: torchbearer/torchbearer/callbacks/early_stopping.py
imports: from __future__ import print_function
  import torchbearer
  from torchbearer.callbacks import Callback
  from .decorators import only_if
  from torchbearer.bases import get_metric
label_desc: Use image node_id 6 for calling the EarlyStopping obj's underlying member method code with example usage: obj.on_end_epoch(state) without return types