class_docstr: Interpreter API implementation for dimensionality reduction model.
class_docstr_tok: ["Interpreter","API","implementation","for","dimensionality","reduction","model","."]
code: def _run(
      self,
      model: lit_model.Model,
      inputs: Sequence[JsonDict],
      model_outputs: Optional[Sequence[JsonDict]] = None,
      do_fit=False,
  ):
      # Run model, if needed.
      if model_outputs is None:
          model_outputs = list(model.predict(inputs))
      assert len(model_outputs) == len(inputs)
  
      converted_inputs = list(
          map(self.convert_input, inputs, model_outputs)
      )
      if do_fit:
          return self._projector.fit_transform(converted_inputs)
      else:
          return self._projector.predict(converted_inputs)
  
imports: from collections.abc import Hashable, Sequence
  import threading
  from typing import Optional
  from absl import logging
  from lit_nlp.api import components
  from lit_nlp.api import dataset
  from lit_nlp.api import model
  from lit_nlp.api import types
  from lit_nlp.lib import caching
label_desc: Use image node_id 4 for calling the ProjectionInterpreter obj's underlying member method code with example usage: obj._run(model, inputs, model_outputs, do_fit) and returns: self, self