code: def __init__(self, learner, params):
      super(TerminateOnNan, self).__init__(learner, params)
      self.metric = Metric(params.get("metric_name"))
  
imports: import logging
  import numpy
  from supervised.callbacks.callback import Callback
label_desc: Use image node_id 1 to create a new TerminateOnNan object from inherited base classes: Callback with example: obj = TerminateOnNan(learner, params)