class_docstr: Forecaster base model for lstm, seq2seq, tcn and nbeats forecasters.
class_docstr_tok: ["Forecaster","base","model","for","lstm",",","seq2seq",",","tcn","and","nbeats","forecasters","."]
docstr: restore the forecaster.
  
  :param checkpoint_file: The checkpoint file location you want to load the forecaster.
  :param quantize_checkpoint_file: The checkpoint file location you want to
         load the quantized forecaster.
code: def load(self, checkpoint_file, quantize_checkpoint_file=None):
      """
      restore the forecaster.
  
      :param checkpoint_file: The checkpoint file location you want to load the forecaster.
      :param quantize_checkpoint_file: The checkpoint file location you want to
             load the quantized forecaster.
      """
      from bigdl.chronos.pytorch import TSTrainer as Trainer
  
      if self.distributed:
          self.internal.load(checkpoint_file)
      else:
          from bigdl.nano.pytorch.lightning import LightningModule
          from bigdl.chronos.pytorch import TSTrainer as Trainer
  
          if self.use_hpo:
              ckpt = torch.load(checkpoint_file)
              hparams = ckpt["hyper_parameters"]
              model = self.model_creator(hparams)
              loss = self.loss_creator(hparams)
              optimizer = self.optimizer_creator(model, hparams)
          else:
              model = self.model_creator(
                  {**self.model_config, **self.data_config}
              )
              loss = self.loss_creator(self.loss_config)
              optimizer = self.optimizer_creator(
                  model, self.optim_config
              )
          self.internal = LightningModule.load_from_checkpoint(
              checkpoint_file,
              model=model,
              loss=loss,
              optimizer=optimizer,
          )
          self.internal = Trainer.compile(self.internal)
          self.fitted = True
          if quantize_checkpoint_file:
              # self.internal.load_quantized_state_dict(torch.load(quantize_checkpoint_file))
              self.accelerated_model = Trainer.load(
                  quantize_checkpoint_file, self.internal
              )
              self.accelerate_method = "pytorch_int8"
          # This trainer is only for quantization, once the user call `fit`, it will be
          # replaced according to the new training config
          self.trainer = Trainer(
              logger=False,
              max_epochs=1,
              enable_checkpointing=self.checkpoint_callback,
              num_processes=self.num_processes,
              use_ipex=self.use_ipex,
          )
  
imports: from bigdl.chronos.forecaster.abstract import Forecaster
  from bigdl.chronos.forecaster.utils import *
  from bigdl.chronos.metric.forecast_metrics import Evaluator
  from typing import Optional
  import numpy
  import warnings
  import os
  from tempfile import TemporaryDirectory
  import torch
  from torch.utils.data import TensorDataset, DataLoader
  from .utils_hpo import GenericLightningModule, _format_metric_str, _config_has_search_space
  from bigdl.nano.utils.common import invalidOperationError, invalidInputError
  from bigdl.chronos.data.tsdataset import TSDataset
  from bigdl.chronos.pytorch.context_manager import DummyForecasterContextManager, ForecasterContextManager
  from bigdl.chronos.pytorch.utils import _pytorch_fashion_inference
label_desc: Use image node_id 16 for calling the BasePytorchForecaster obj's underlying member method code with example usage: obj.load(checkpoint_file, quantize_checkpoint_file) without return types