docstr: This method builds a cache for the entire dataframe provided at initialization. 
docstr_tok: ["This","method","builds","a","cache","for","the","entire","dataframe","provided","at","initialization","."]
code: def build_cache(self):
      """This method builds a cache for the entire dataframe provided at initialization."""
      if not self.use_cache:
          raise RuntimeError(
              "Cannot build a cache for EncodedDS with `use_cache` set to False."
          )
  
      idxs = list(range(len(self.data_frame)))
      X, Y = self._encode_idxs(idxs)
      self.X_cache = X
      self.Y_cache = Y
      self.cache_built = True
  
imports: import inspect
  from typing import List, Tuple, Dict
  import torch
  import numpy
  import pandas
  from torch.utils.data import Dataset
  from lightwood.encoder.base import BaseEncoder
label_desc: Use image node_id 8 for calling the EncodedDs obj's underlying member method code with example usage: obj.build_cache() without return types