class_docstr: Defines the ExplainerManager for explaining a text-based model.
class_docstr_tok: ["Defines","the","ExplainerManager","for","explaining","a","text-based","model","."]
docstr: Add an explainer to be computed later.
docstr_tok: ["Add","an","explainer","to","be","computed","later","."]
code: def add(self):
      """Add an explainer to be computed later."""
      if self._model is None:
          raise UserConfigValidationException(
              "Model is required for model explanations"
          )
  
      if self._is_added:
          warnings.warn(
              (
                  "DUPLICATE-EXPLAINER-CONFIG: Ignoring. "
                  "Explanation has already been added, "
                  "currently limited to one explainer type."
              ),
              UserWarning,
          )
          return
      self._is_added = True
  
imports: import json
  import pickle
  import warnings
  from pathlib import Path
  from typing import Any, List, Optional
  import numpy
  import pandas
  import shap
  from raiutils.data_processing import convert_to_list
  from responsibleai._interfaces import FeatureImportance, ModelExplanationData, PrecomputedExplanations, TextFeatureImportance
  from responsibleai._internal.constants import ExplainerManagerKeys
  from responsibleai._internal.constants import ListProperties, ManagerNames, Metadata
  from responsibleai._tools.shared.state_directory_management import DirectoryManager
  from responsibleai.exceptions import UserConfigValidationException
  from responsibleai.managers.base_manager import BaseManager
  from responsibleai_text.common.constants import ModelTask, QuestionAnsweringFields, Tokens
  from responsibleai_text.utils.question_answering import QAPredictor
label_desc: Use image node_id 2 for calling the ExplainerManager obj's underlying member method code with example usage: obj.add() without return types