class_docstr: A wrapper around an instance of [`~datasets.Datasets`]. The dataset and the index are both loaded from the
  indicated paths on disk.
  
  Args:
      vector_size (`int`): the dimension of the passages embeddings used by the index
      dataset_path (`str`):
          The path to the serialized dataset on disk. The dataset should have 3 columns: title (str), text (str) and
          embeddings (arrays of dimension vector_size)
      index_path (`str`)
          The path to the serialized faiss index on disk.
class_docstr_tok: ["A","wrapper","around","an","instance","of","[","`","~datasets.Datasets","`","]",".","The","dataset","and","the","index","are","both","loaded","from","the","indicated","paths","on","disk",".","Args",":","vector_size","(","`","int","`",")",":","the","dimension","of","the","passages","embeddings","used","by","the","index","dataset_path","(","`","str","`",")",":","The","path","to","the","serialized","dataset","on","disk",".","The","dataset","should","have","3","columns",":","title","(","str",")",",","text","(","str",")","and","embeddings","(","arrays","of","dimension","vector_size",")","index_path","(","`","str","`",")","The","path","to","the","serialized","faiss","index","on","disk","."]
code: def __init__(self, vector_size: int, dataset, index_path=None):
      super().__init__(
          vector_size, dataset, index_initialized=index_path is None
      )
      self.index_path = index_path
  
imports: import os
  import pickle
  import time
  from typing import Iterable, List, Optional, Tuple
  import numpy
  from ...tokenization_utils import PreTrainedTokenizer
  from ...tokenization_utils_base import BatchEncoding
  from ...utils import cached_file, is_datasets_available, is_faiss_available, logging, requires_backends, strtobool
  from .configuration_rag import RagConfig
  from .tokenization_rag import RagTokenizer
label_desc: Use image node_id 1 to create a new CustomHFIndex object from inherited base classes: HFIndexBase with example: obj = CustomHFIndex(vector_size, dataset, index_path)