code: def rolling_validation(self, Ymat, tau=24, n=7, bsize=90, alpha=0.3):
      last_step = Ymat.shape[1] - tau * n
      rg = 1 + 2 * (self.kernel_size - 1) * 2 ** (
          len(self.num_channels) - 1
      )
      self.seq = self.seq.eval()
      if self.covariates is not None:
          covs = self.covariates[:, last_step - rg : last_step + tau]
      else:
          covs = None
      if self.Ycov is not None:
          ycovs = self.Ycov[:, :, last_step - rg : last_step + tau]
      else:
          ycovs = None
      data_in = Ymat[:, last_step - rg : last_step]
      out = self.predict_future(
          data_in,
          covariates=covs,
          ycovs=ycovs,
          future=tau,
          bsize=bsize,
          normalize=self.normalize,
      )
      predicted_values = []
      actual_values = []
      S = out[:, -tau::]
      predicted_values += [S]
      R = Ymat[:, last_step : last_step + tau]
      actual_values += [R]
      print("Current window wape:{}".format(wape(S, R)))
  
      for i in range(n - 1):
          last_step += tau
          rg = 1 + 2 * (self.kernel_size - 1) * 2 ** (
              len(self.num_channels) - 1
          )
          if self.covariates is not None:
              covs = self.covariates[
                  :, last_step - rg : last_step + tau
              ]
          else:
              covs = None
          if self.Ycov is not None:
              ycovs = self.Ycov[:, :, last_step - rg : last_step + tau]
          else:
              ycovs = None
          data_in = Ymat[:, last_step - rg : last_step]
          out = self.predict_future(
              data_in,
              covariates=covs,
              ycovs=ycovs,
              future=tau,
              bsize=bsize,
              normalize=self.normalize,
          )
          S = out[:, -tau::]
          predicted_values += [S]
          R = Ymat[:, last_step : last_step + tau]
          actual_values += [R]
          print("Current window wape:{}".format(wape(S, R)))
  
      predicted = np.hstack(predicted_values)
      actual = np.hstack(actual_values)
  
      dic = {}
      dic["wape"] = wape(predicted, actual)
      dic["mape"] = mape(predicted, actual)
      dic["smape"] = smape(predicted, actual)
      dic["mae"] = np.abs(predicted - actual).mean()
      dic["rmse"] = np.sqrt(((predicted - actual) ** 2).mean())
      dic["nrmse"] = dic["rmse"] / np.sqrt(((actual) ** 2).mean())
  
      baseline = Ymat[
          :, Ymat.shape[1] - n * tau - tau : Ymat.shape[1] - tau
      ]
      dic["baseline_wape"] = wape(baseline, actual)
      dic["baseline_mape"] = mape(baseline, actual)
      dic["baseline_smape"] = smape(baseline, actual)
  
      return dic
  
imports: import pickle
  import numpy
  import torch
  import torch.nn
  import torch.optim
  from torch.autograd import Variable
  from torch.nn.utils import weight_norm
  from zoo.chronos.model.tcmf.data_loader import TCMFDataLoader
  from zoo.chronos.model.tcmf.time import TimeCovariates
  import logging
label_desc: Use image node_id 12 for calling the LocalModel obj's underlying member method code with example usage: obj.rolling_validation(Ymat, tau, n, bsize, alpha) and returns: dic