class_docstr: TSPipeline is an E2E solution for time series analysis (only forecasting task for now).
  You can use TSPipeline to:
  
  1. Further development on the prototype. (predict, evaluate, incremental fit)
  
  2. Deploy the model to their scenario. (save, load)
docstr: Evaluate the time series pipeline.
  
  :param data: data can be a TSDataset or data creator.
         The TSDataset should follow the same operations as the training
         TSDataset used in AutoTSEstimator.fit.
  :param metrics: list of string or callable. e.g. ['mse'] or [customized_metrics]
         If callable function, it signature should be func(y_true, y_pred), where y_true and
         y_pred are numpy ndarray. The function should return a float value as evaluation
         result.
  :param multioutput: Defines aggregating of multiple output values.
         String in ['raw_values', 'uniform_average']. The value defaults to
         'uniform_average'.
  :param batch_size: predict batch_size, the process will cost more time
         if batch_size is small while cost less memory. The param is only
         effective when data is a TSDataset. The values defaults to 32.
  :param quantize: if use the quantized model to predict.
docstr_tok: ["Evaluate","the","time","series","pipeline",".",":","param","data",":","data","can","be","a","TSDataset","or","data","creator",".","The","TSDataset","should","follow","the","same","operations","as","the","training","TSDataset","used","in","AutoTSEstimator.fit",".",":","param","metrics",":","list","of","string","or","callable",".","e.g",".","[","'mse","'","]","or","[","customized_metrics","]","If","callable","function",",","it","signature","should","be","func","(","y_true",",","y_pred",")",",","where","y_true","and","y_pred","are","numpy","ndarray",".","The","function","should","return","a","float","value","as","evaluation","result",".",":","param","multioutput",":","Defines","aggregating","of","multiple","output","values",".","String","in","[","'raw_values","'",",","'uniform_average","'","]",".","The","value","defaults","to","'uniform_average","'",".",":","param","batch_size",":","predict","batch_size",",","the","process","will","cost","more","time","if","batch_size","is","small","while","cost","less","memory",".","The","param","is","only","effective","when","data","is","a","TSDataset",".","The","values","defaults","to","32.",":","param","quantize",":","if","use","the","quantized","model","to","predict","."]
code: def evaluate(
      self,
      data,
      metrics=["mse"],
      multioutput="uniform_average",
      batch_size=32,
      quantize=False,
  ):
      """
      Evaluate the time series pipeline.
  
      :param data: data can be a TSDataset or data creator.
             The TSDataset should follow the same operations as the training
             TSDataset used in AutoTSEstimator.fit.
      :param metrics: list of string or callable. e.g. ['mse'] or [customized_metrics]
             If callable function, it signature should be func(y_true, y_pred), where y_true and
             y_pred are numpy ndarray. The function should return a float value as evaluation
             result.
      :param multioutput: Defines aggregating of multiple output values.
             String in ['raw_values', 'uniform_average']. The value defaults to
             'uniform_average'.
      :param batch_size: predict batch_size, the process will cost more time
             if batch_size is small while cost less memory. The param is only
             effective when data is a TSDataset. The values defaults to 32.
      :param quantize: if use the quantized model to predict.
      """
      # predict
      if isinstance(data, TSDataset):
          x, y = self._tsdataset_to_numpy(data, is_predict=False)
          if quantize:
              with torch.inference_mode():
                  yhat = _pytorch_fashion_inference(
                      model=self._pytorch_int8,
                      input_data=x,
                      batch_size=batch_size,
                  )
          else:
              self._best_model.eval()
              with torch.inference_mode():
                  yhat = _pytorch_fashion_inference(
                      model=self._best_model,
                      input_data=x,
                      batch_size=batch_size,
                  )
          # unscale
          yhat = self._tsdataset_unscale(yhat)
          y = self._tsdataset_unscale(y)
      elif isinstance(data, types.FunctionType):
          yhat_list, y_list = [], []
          self._best_config.update({"batch_size": batch_size})
          for x, y in data(self._best_config):
              if quantize:
                  with torch.inference_mode():
                      yhat = _pytorch_fashion_inference(
                          model=self._pytorch_int8, input_data=x.numpy()
                      )
              else:
                  self._best_model.eval()
                  with torch.inference_mode():
                      yhat = _pytorch_fashion_inference(
                          model=self._best_model, input_data=x.numpy()
                      )
              yhat_list.append(yhat)
              y_list.append(y)
          yhat = np.concatenate(yhat_list, axis=0)
          y = torch.cat(y_list, dim=0).numpy()
      else:
          invalidInputError(
              False,
              "We only support input tsdataset or data creator, "
              f"but found {data.__class__.__name__}.",
          )
  
      # evaluate
      aggregate = "mean" if multioutput == "uniform_average" else None
      eval_result = Evaluator.evaluate(
          metrics, y, yhat, aggregate=aggregate
      )
      return eval_result
  
imports: import os
  from bigdl.chronos.utils import LazyImport
  import types
  import numpy
  from bigdl.chronos.data import TSDataset
  from bigdl.chronos.metric.forecast_metrics import Evaluator
  from bigdl.chronos.pytorch.utils import _pytorch_fashion_inference
  from bigdl.nano.utils.common import invalidInputError
label_desc: Use image node_id 2 for calling the TSPipeline obj's underlying member method code with example usage: obj.evaluate(data, metrics, multioutput, batch_size, quantize) and returns: eval_result