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 onnx model file to the disk.
  
  :param dirname: The dir location you want to save the onnx file.
  :param quantized_dirname: The dir location you want to save the quantized onnx file.
code: def export_onnx_file(
      self, dirname="fp32_onnx", quantized_dirname=None
  ):
      """
      Save the onnx model file to the disk.
  
      :param dirname: The dir location you want to save the onnx file.
      :param quantized_dirname: The dir location you want to save the quantized onnx file.
      """
      from bigdl.chronos.pytorch import (
          TSInferenceOptimizer as InferenceOptimizer,
      )
  
      if self.distributed:
          invalidInputError(
              False,
              "export_onnx_file has not been supported for distributed "
              "forecaster. You can call .to_local() to transform the "
              "forecaster to a non-distributed version.",
          )
      if quantized_dirname:
          if self.accelerate_method == "onnxruntime_int8":
              InferenceOptimizer.save(
                  self.accelerated_model, quantized_dirname
              )
          else:
              warnings.warn(
                  "Please call .quantize() method to build "
                  "an up-to-date quantized model"
              )
      if dirname:
          if self.accelerate_method != "onnxruntime_fp32":
              self.build_onnx(self.thread_num)
          InferenceOptimizer.save(self.accelerated_model, dirname)
  
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 22 for calling the BasePytorchForecaster obj's underlying member method code with example usage: obj.export_onnx_file(dirname, quantized_dirname) without return types