class_docstr: Defines the top-level RAITextInsights API.
  
  Use RAITextInsights to assess text machine learning models in a
  single API.
class_docstr_tok: ["Defines","the","top-level","RAITextInsights","API",".","Use","RAITextInsights","to","assess","text","machine","learning","models","in","a","single","API","."]
docstr: Load the metadata.
  
  :param inst: RAITextInsights object instance.
  :type inst: RAITextInsights
  :param path: The directory path to metadata location.
  :type path: str
docstr_tok: ["Load","the","metadata",".",":","param","inst",":","RAITextInsights","object","instance",".",":","type","inst",":","RAITextInsights",":","param","path",":","The","directory","path","to","metadata","location",".",":","type","path",":","str"]
code: def _load_metadata(inst, path):
      """Load the metadata.
  
      :param inst: RAITextInsights object instance.
      :type inst: RAITextInsights
      :param path: The directory path to metadata location.
      :type path: str
      """
      top_dir = Path(path)
      with open(top_dir / _META_JSON, "r") as meta_file:
          meta = meta_file.read()
      meta = json.loads(meta)
      inst.__dict__[_TARGET_COLUMN] = meta[_TARGET_COLUMN]
      inst.__dict__[_TASK_TYPE] = meta[_TASK_TYPE]
      inst.__dict__[_PREDICT_OUTPUT] = None
      text_column = None
      if _TEXT_COLUMN in meta:
          text_column = meta[_TEXT_COLUMN]
      inst.__dict__[_TEXT_COLUMN] = text_column
      classes = meta[_CLASSES]
  
      inst.__dict__["_" + _CLASSES] = RAITextInsights._get_classes(
          task_type=meta[_TASK_TYPE],
          test=inst.__dict__[_TEST],
          target_column=meta[_TARGET_COLUMN],
          classes=classes,
      )
  
      if (
          Metadata.FEATURE_METADATA not in meta
          or meta[Metadata.FEATURE_METADATA] is None
      ):
          inst.__dict__[
              "_" + Metadata.FEATURE_METADATA
          ] = FeatureMetadata()
      else:
          feature_metadata_dict = meta[Metadata.FEATURE_METADATA]
          feature_metadata = _feature_metadata_from_dict(
              feature_metadata_dict
          )
          inst.__dict__[
              "_" + Metadata.FEATURE_METADATA
          ] = feature_metadata
  
      # load the extracted features as part of metadata
      RAITextInsights._load_ext_data(inst, path)
  
imports: import json
  import logging
  import pickle
  import warnings
  from enum import Enum
  from pathlib import Path
  from typing import Any, List, Optional, Union
  import numpy
  import pandas
  from ml_wrappers import wrap_model
  from erroranalysis._internal.cohort_filter import FilterDataWithCohortFilters
  from raiutils.data_processing import convert_to_list, serialize_json_safe
  from raiutils.models import SKLearn, is_classifier
  from responsibleai._interfaces import Dataset, RAIInsightsData
  from responsibleai._internal.constants import ManagerNames, Metadata, SerializationAttributes
  from responsibleai.exceptions import UserConfigValidationException
  from responsibleai.feature_metadata import FeatureMetadata
  from responsibleai.rai_insights.rai_base_insights import RAIBaseInsights
  from responsibleai_text.common.constants import ModelTask
  from responsibleai_text.managers.error_analysis_manager import ErrorAnalysisManager
  from responsibleai_text.managers.explainer_manager import ExplainerManager
  from responsibleai_text.utils.feature_extractors import extract_features, get_text_columns
label_desc: Use image node_id 20 for calling the RAITextInsights obj's underlying member method code with example usage: obj._load_metadata(inst, path) without return types