docstr: Judge if meet the stop conditon(early_stop, min_threshold,
  max_threshold).
  Parameters
  ----------
  ori_metric : float
      original validation metric
  cur_metric : float
      current validation metric
  
  Returns
  -------
  stop : bool
      if stop the sensitivity analysis
docstr_tok: ["Judge","if","meet","the","stop","conditon","(","early_stop",",","min_threshold",",","max_threshold",")",".","Parameters","--","--","--","--","--","ori_metric",":","float","original","validation","metric","cur_metric",":","float","current","validation","metric","Returns","--","--","--","-","stop",":","bool","if","stop","the","sensitivity","analysis"]
code: def _need_to_stop(self, ori_metric, cur_metric):
      """
      Judge if meet the stop conditon(early_stop, min_threshold,
      max_threshold).
      Parameters
      ----------
      ori_metric : float
          original validation metric
      cur_metric : float
          current validation metric
  
      Returns
      -------
      stop : bool
          if stop the sensitivity analysis
      """
      if self.early_stop_mode is None:
          # early stop mode is not enable
          return False
      assert self.early_stop_value is not None
      if self.early_stop_mode == "minimize":
          if cur_metric < self.early_stop_value:
              return True
      elif self.early_stop_mode == "maximize":
          if cur_metric > self.early_stop_value:
              return True
      elif self.early_stop_mode == "dropped":
          if cur_metric < ori_metric - self.early_stop_value:
              return True
      elif self.early_stop_mode == "raised":
          if cur_metric > ori_metric + self.early_stop_value:
              return True
      return False
  
file_path: auptimizer/src/aup/compression/torch/utils/sensitivity_analysis.py
imports: import copy
  import csv
  import logging
  from collections import OrderedDict
  import numpy
  import torch.nn
label_desc: Use image node_id 4 for calling the SensitivityAnalysis obj's underlying member method code with example usage: obj._need_to_stop(ori_metric, cur_metric) and returns: False, False, True, True, True, True