code: def __init__(self, validation_dates: int, skip_cache: bool = False):
      self.validation_dates = validation_dates
  
      dates_cache_path = lab.get_data_path() / "dates.npy"
      packets_cache_path = lab.get_data_path() / "packets.npy"
  
      if (
          skip_cache
          or not dates_cache_path.exists()
          or not packets_cache_path.exists()
      ):
          with monit.section("Build cache"):
              build_cache()
  
      with monit.section("Cache"):
          self.dates = np.load(str(dates_cache_path))
          self.packets = torch.tensor(
              np.load(str(packets_cache_path)), dtype=torch.float
          )
  
file_path: labml/samples/stocks/dataset.py
imports: import numpy
  import torch
  from labml import monit, lab
  from labml import tracker
  from torch.utils.data import Dataset
  from stocks import CandleIdx
  from stocks.build_numpy_cache import build_cache
label_desc: Use image node_id 1 to create a new MinutelyData object  with example: obj = MinutelyData(validation_dates, skip_cache)