class_docstr: Abstract base class for all stopping criteria that can be applied during generation.
class_docstr_tok: ["Abstract","base","class","for","all","stopping","criteria","that","can","be","applied","during","generation","."]
code: def __call__(
      self,
      input_ids: "torch.LongTensor",
      scores: "torch.FloatTensor",
      **kwargs,
  ) -> bool:
      raise NotImplementedError(
          "StoppingCriteria needs to be subclassed"
      )
  
imports: import time
  from abc import ABC
  from copy import deepcopy
  from typing import Optional
  from .file_utils import add_start_docstrings
  from fastNLP.envs.imports import _NEED_IMPORT_TORCH
  from fastNLP.core.log import logger
label_desc: Use image node_id 1 for calling the StoppingCriteria obj's underlying member method code with example usage: obj.__call__(input_ids, scores) without return types