def __call__(self, info):
        i = info['n_iter']
        if isinstance(self.func_or_key, basestring):
            loss = info[self.func_or_key]
        elif isinstance(self.func_or_key, (tuple, list)):
            loss = info
            for j in self.func_or_key:
                loss = loss[j]
        else:
            loss = self.func_or_key()

        if loss < self.best_loss:
            if (self.best_loss - loss) > self.threshold and i > 0:
                self.patience = max(i * self.grow_factor + self.grow_offset,
                                    self.patience)
            self.best_iter = i
            self.best_loss = loss

        return i >= self.patience
dataset/ETHPy150Open BRML/climin/climin/stops/stops.py/Patience.__call__/original