class_docstr: Abstract base class for all stopping criteria that can be applied during generation.
  
  If your stopping criteria depends on the `scores` input, make sure you pass `return_dict_in_generate=True,
  output_scores=True` to `generate`.
class_docstr_tok: ["Abstract","base","class","for","all","stopping","criteria","that","can","be","applied","during","generation",".","If","your","stopping","criteria","depends","on","the","`","scores","`","input",",","make","sure","you","pass","`","return_dict_in_generate=True",",","output_scores=True","`","to","`","generate","`","."]
code: def __call__(
      self,
      input_ids: torch.LongTensor,
      scores: torch.FloatTensor,
      **kwargs,
  ) -> bool:
      raise NotImplementedError(
          "StoppingCriteria needs to be subclassed"
      )
  
imports: import time
  import warnings
  from abc import ABC
  from copy import deepcopy
  from typing import Optional
  import torch
  from ..utils import add_start_docstrings, logging
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