(self, eval_dict: dict)
Parameters
        ----------
        eval_dict dict, {metric_name:metric_val}, e.g. {'auc':0.99}

        Returns stop flag, if should stop return True, else False
        -------
def update(self, eval_dict: dict):
        """

        Parameters
        ----------
        eval_dict dict, {metric_name:metric_val}, e.g. {'auc':0.99}

        Returns stop flag, if should stop return True, else False
        -------
        """
        if len(eval_dict) == 0:
            return

        for metric in eval_dict:
            if metric not in self.allowed_metric:
                continue
            if self.has_improved(eval_dict[metric], metric, self.cur_best_performance):
                self.cur_best_performance[metric] = eval_dict[metric]
                self.no_improvement_round[metric] = 0
            else:
                self.no_improvement_round[metric] += 1
def update ( self , eval_dict : dict ) : if len ( eval_dict ) == 0 : return for metric in eval_dict : if metric not in self . allowed_metric : continue if self . has_improved ( eval_dict [ metric ] , metric , self . cur_best_performance ) : self . cur_best_performance [ metric ] = eval_dict [ metric ] self . no_improvement_round [ metric ] = 0 else : self . no_improvement_round [ metric ] += 1