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: Save the forecaster.
  
  Please note that if you only want the pytorch model or onnx model
  file, you can call .get_model() or .export_onnx_file(). The checkpoint
  file generated by .save() method can only be used by .load().
  
  :param checkpoint_file: The location you want to save the forecaster.
  :param quantize_checkpoint_file: The location you want to save quantized forecaster.
code: def save(self, checkpoint_file, quantize_checkpoint_file=None):
      """
      Save the forecaster.
  
      Please note that if you only want the pytorch model or onnx model
      file, you can call .get_model() or .export_onnx_file(). The checkpoint
      file generated by .save() method can only be used by .load().
  
      :param checkpoint_file: The location you want to save the forecaster.
      :param quantize_checkpoint_file: The location you want to save quantized forecaster.
      """
      from bigdl.chronos.pytorch import TSTrainer as Trainer
  
      if self.distributed:
          self.internal.save(checkpoint_file)
      else:
          if not self.fitted:
              invalidInputError(
                  False,
                  "You must call fit or restore first before calling save!",
              )
          # user may never call the fit before
          if self.trainer.model is None:
              self.trainer.model = self.internal
          self.trainer.save_checkpoint(
              checkpoint_file
          )  # save current status
          if quantize_checkpoint_file:
              if self.accelerate_method == "pytorch_int8":
                  Trainer.save(
                      self.accelerated_model, quantize_checkpoint_file
                  )
              else:
                  warnings.warn(
                      "Please call .quantize() method to build "
                      "an up-to-date quantized model"
                  )
  
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 15 for calling the BasePytorchForecaster obj's underlying member method code with example usage: obj.save(checkpoint_file, quantize_checkpoint_file) without return types