class_docstr: Model-provided salience interpreter.
class_docstr_tok: ["Model-provided","salience","interpreter","."]
code: def __init__(self, models: dict[str, lit_model.Model]):
      # Populate saliency fields in meta spec based on saliency returned by
      # model output specs.
      self._spec = {}
      for model_name, model in models.items():
          fields = self.find_fields(model)
          for field in fields:
              self._spec[f"{model_name}:{field}"] = model.output_spec()[
                  field
              ]
  
file_path: lit/lit_nlp/components/model_salience.py
imports: from typing import Optional, Union
  from lit_nlp.api import components
  from lit_nlp.api import dataset
  from lit_nlp.api import dtypes
  from lit_nlp.api import model
  from lit_nlp.api import types
  from lit_nlp.lib import utils
label_desc: Use image node_id 1 to create a new ModelSalience object from inherited base classes: components with example: obj = ModelSalience(models)