class_docstr: Custom GLUE model for the Input Salience Evaluation demo.
docstr: Returns true if the model is compatible with the dataset.
  
  The Input Salience Eval demo is somewhat unique in that each model and
  dataset have compatible specs but the intention is to pair them for
  specific tasks.
  
  This class determines compatibility by:
  
  1.  Ensuring that the value of `model_name` is contained in the `default`
      value of the `dataset_name` field in the provided `dataset_spec`.
  2.  Calling super().is_compatible_with_dataset() to check compatibility
      using the base ModelSpec check.
  
  Args:
    dataset: The dataset for which compatibility will be determined.
docstr_tok: ["Returns","true","if","the","model","is","compatible","with","the","dataset",".","The","Input","Salience","Eval","demo","is","somewhat","unique","in","that","each","model","and","dataset","have","compatible","specs","but","the","intention","is","to","pair","them","for","specific","tasks",".","This","class","determines","compatibility","by",":","1",".","Ensuring","that","the","value","of","`","model_name","`","is","contained","in","the","`","default","`","value","of","the","`","dataset_name","`","field","in","the","provided","`","dataset_spec","`",".","2",".","Calling","super","(",")",".is_compatible_with_dataset","(",")","to","check","compatibility","using","the","base","ModelSpec","check",".","Args",":","dataset",":","The","dataset","for","which","compatibility","will","be","determined","."]
code: def is_compatible_with_dataset(
      self, dataset: lit_dataset.Dataset
  ) -> bool:
      """Returns true if the model is compatible with the dataset.
  
      The Input Salience Eval demo is somewhat unique in that each model and
      dataset have compatible specs but the intention is to pair them for
      specific tasks.
  
      This class determines compatibility by:
  
      1.  Ensuring that the value of `model_name` is contained in the `default`
          value of the `dataset_name` field in the provided `dataset_spec`.
      2.  Calling super().is_compatible_with_dataset() to check compatibility
          using the base ModelSpec check.
  
      Args:
        dataset: The dataset for which compatibility will be determined.
      """
      if not isinstance(
          dataset, is_eval_datasets.SingleInputClassificationFromTSV
      ):
          return False
  
      eval_dataset = cast(
          is_eval_datasets.SingleInputClassificationFromTSV, dataset
      )
      if self.model_name in eval_dataset.name:
          return super().is_compatible_with_dataset(dataset)
      else:
          return False
  
file_path: lit/lit_nlp/examples/is_eval/models.py
imports: from typing import cast
  from lit_nlp.api import dataset
  from lit_nlp.examples.is_eval import datasets
  from lit_nlp.examples.models import glue_models
label_desc: Use image node_id 2 for calling the ISEvalModel obj's underlying member method code with example usage: obj.is_compatible_with_dataset(dataset) and returns: False, super, False