class_docstr: NLI-based zero-shot classification pipeline using a `ModelForSequenceClassification` trained on NLI (natural
  language inference) tasks.
  
  Any combination of sequences and labels can be passed and each combination will be posed as a premise/hypothesis
  pair and passed to the pretrained model. Then, the logit for *entailment* is taken as the logit for the candidate
  label being valid. Any NLI model can be used, but the id of the *entailment* label must be included in the model
  config's :attr:*~transformers.PretrainedConfig.label2id*.
  
  This NLI pipeline can currently be loaded from [`pipeline`] using the following task identifier:
  `"zero-shot-classification"`.
  
  The models that this pipeline can use are models that have been fine-tuned on an NLI task. See the up-to-date list
  of available models on [huggingface.co/models](https://huggingface.co/models?search=nli).
class_docstr_tok: ["NLI-based","zero-shot","classification","pipeline","using","a","`","ModelForSequenceClassification","`","trained","on","NLI","(","natural","language","inference",")","tasks",".","Any","combination","of","sequences","and","labels","can","be","passed","and","each","combination","will","be","posed","as","a","premise\/hypothesis","pair","and","passed","to","the","pretrained","model",".","Then",",","the","logit","for","*","entailment","*","is","taken","as","the","logit","for","the","candidate","label","being","valid",".","Any","NLI","model","can","be","used",",","but","the","id","of","the","*","entailment","*","label","must","be","included","in","the","model","config","'s",":","attr",":","*","~transformers.PretrainedConfig.label2id","*",".","This","NLI","pipeline","can","currently","be","loaded","from","[","`","pipeline","`","]","using","the","following","task","identifier",":","`","``","zero-shot-classification","''","`",".","The","models","that","this","pipeline","can","use","are","models","that","have","been","fine-tuned","on","an","NLI","task",".","See","the","up-to-date","list","of","available","models","on","[","huggingface.co\/models","]","(","https",":","\/\/huggingface.co\/models","?","search=nli",")","."]
code: def entailment_id(self):
      for label, ind in self.model.config.label2id.items():
          if label.lower().startswith("entail"):
              return ind
      return -1
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/src/transformers/pipelines/zero_shot_classification.py
imports: from typing import List, Union
  import numpy
  from ..tokenization_utils import TruncationStrategy
  from ..utils import add_end_docstrings, logging
  from .base import PIPELINE_INIT_ARGS, ArgumentHandler, ChunkPipeline
label_desc: Use image node_id 2 for calling the ZeroShotClassificationPipeline obj's underlying member method code with example usage: obj.entailment_id() and returns: unknown, ind