docstr: Generate the training, validation and test datasets for prediction
  
  Returns:
      Tuple[BaseDataset, BaseDataset, BaseDataset]: The training and test datasets
docstr_tok: ["Generate","the","training",",","validation","and","test","datasets","for","prediction","Returns",":","Tuple","[","BaseDataset",",","BaseDataset",",","BaseDataset","]",":","The","training","and","test","datasets"]
code: def get_pre_datasets(self):
      """Generate the training, validation and test datasets for prediction
  
      Returns:
          Tuple[BaseDataset, BaseDataset, BaseDataset]: The training and test datasets
      """
  
      dict_feature_path = self.feature_conf["path"]
      train_feature_path = dict_feature_path[:-4] + "_train.pkl"
      valid_feature_path = dict_feature_path[:-4] + "_valid.pkl"
      test_feature_path = dict_feature_path[:-4] + "_test.pkl"
  
      dict_label_path = self.label_conf["path"]
      train_label_path = dict_label_path[:-4] + "_train.pkl"
      valid_label_path = dict_label_path[:-4] + "_valid.pkl"
      test_label_path = dict_label_path[:-4] + "_test.pkl"
  
      if (
          not os.path.isfile(train_feature_path)
          or not os.path.isfile(valid_feature_path)
          or not os.path.isfile(test_feature_path)
      ):
          xtrain, xvalid, xtest = self._gen_data(self.feature_conf)
          xtrain.to_pickle(train_feature_path)
          xvalid.to_pickle(valid_feature_path)
          xtest.to_pickle(test_feature_path)
          del xtrain, xvalid, xtest
  
      if (
          not os.path.isfile(train_label_path)
          or not os.path.isfile(valid_label_path)
          or not os.path.isfile(test_label_path)
      ):
          ytrain, yvalid, ytest = self._gen_data(self.label_conf)
          ytrain.to_pickle(train_label_path)
          yvalid.to_pickle(valid_label_path)
          ytest.to_pickle(test_label_path)
          del ytrain, yvalid, ytest
  
      feature = {
          "train": train_feature_path,
          "valid": valid_feature_path,
          "test": test_feature_path,
      }
  
      label = {
          "train": train_label_path,
          "valid": valid_label_path,
          "test": test_label_path,
      }
  
      return feature, label
  
imports: import os
  import time
  import datetime
  from typing import Optional
  import qlib
  from qlib import get_module_logger
  from qlib.data import D
  from qlib.config import REG_CN
  from qlib.utils import init_instance_by_config
  from qlib.data.dataset.handler import DataHandlerLP
  from qlib.data.data import Cal
  from qlib.contrib.ops.high_freq import get_calendar_day, DayLast, FFillNan, BFillNan, Date, Select, IsNull, IsInf, Cut
  import pickle
  from joblib import Parallel, delayed
label_desc: Use image node_id 2 for calling the HighFreqProvider obj's underlying member method code with example usage: obj.get_pre_datasets() and returns: feature,  label