code: def rolling_validation(self, Ymat, tau=24, n=7, bsize=90, alpha=0.3):
      prevX = self.X.clone()
      prev_index = self.end_index
      out = self.predict(
          last_step=self.end_index,
          future=tau,
          bsize=bsize,
          normalize=self.normalize,
      )
      out_global = self.predict_global(
          np.arange(self.Ymat.shape[0]),
          last_step=self.end_index,
          future=tau,
          normalize=self.normalize,
          bsize=bsize,
      )
      predicted_values = []
      actual_values = []
      predicted_values_global = []
      S = out[:, -tau::]
      S_g = out_global[:, -tau::]
      predicted_values += [S]
      predicted_values_global += [S_g]
      R = Ymat[:, self.end_index : self.end_index + tau]
      actual_values += [R]
      print("Current window wape:{}".format(wape(S, R)))
  
      self.Xseq = self.Xseq.eval()
      self.Yseq.seq = self.Yseq.seq.eval()
  
      for i in range(n - 1):
          Xn = self.recover_future_X(
              last_step=self.end_index + 1,
              future=tau,
              num_epochs=100000,
              alpha=alpha,
              vanilla=True,
          )
          self.X = torch.cat([self.X, Xn], dim=1)
          self.end_index += tau
          out = self.predict(
              last_step=self.end_index,
              future=tau,
              bsize=bsize,
              normalize=self.normalize,
          )
          out_global = self.predict_global(
              np.arange(self.Ymat.shape[0]),
              last_step=self.end_index,
              future=tau,
              normalize=self.normalize,
              bsize=bsize,
          )
          S = out[:, -tau::]
          S_g = out_global[:, -tau::]
          predicted_values += [S]
          predicted_values_global += [S_g]
          R = Ymat[:, self.end_index : self.end_index + tau]
          actual_values += [R]
          print("Current window wape:{}".format(wape(S, R)))
  
      predicted = np.hstack(predicted_values)
      predicted_global = np.hstack(predicted_values_global)
      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())
  
      dic["wape_global"] = wape(predicted_global, actual)
      dic["mape_global"] = mape(predicted_global, actual)
      dic["smape_global"] = smape(predicted_global, actual)
      dic["mae_global"] = np.abs(predicted_global - actual).mean()
      dic["rmse_global"] = np.sqrt(
          ((predicted_global - actual) ** 2).mean()
      )
      dic["nrmse_global"] = 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)
      self.X = prevX
      self.end_index = prev_index
  
      return dic
  
imports: from __future__ import print_function
  import torch
  import numpy
  import pandas
  import torch.nn
  import torch.optim
  from torch.autograd import Variable
  from zoo.chronos.model.tcmf.data_loader import TCMFDataLoader
  from zoo.chronos.model.tcmf.local_model import TemporalConvNet, LocalModel
  from zoo.chronos.model.tcmf.time import TimeCovariates
  import copy
  import pickle
  import logging
label_desc: Use image node_id 24 for calling the DeepGLO obj's underlying member method code with example usage: obj.rolling_validation(Ymat, tau, n, bsize, alpha) and returns: dic