class_docstr: Modules which have the same shared_module_key and type share parameters.
  Only the first instance of such module should be configured in tasks list.
class_docstr_tok: ["Modules","which","have","the","same","shared_module_key","and","type","share","parameters",".","Only","the","first","instance","of","such","module","should","be","configured","in","tasks","list","."]
docstr: Wrapper method to export PyTorch model to Caffe2 model using :class:`~Exporter`.
  
  Args:
      export_path (str): file path of exported caffe2 model
      metric_channels: output the PyTorch model's execution graph to
      export_onnx_path (str):file path of exported onnx model
docstr_tok: ["Wrapper","method","to","export","PyTorch","model","to","Caffe2","model","using",":","class",":","`","~Exporter","`",".","Args",":","export_path","(","str",")",":","file","path","of","exported","caffe2","model","metric_channels",":","output","the","PyTorch","model","'s","execution","graph","to","export_onnx_path","(","str",")",":","file","path","of","exported","onnx","model"]
code: def export(
      self,
      multitask_model,
      export_path,
      metric_channels,
      export_onnx_path=None,
  ):
      """
      Wrapper method to export PyTorch model to Caffe2 model using :class:`~Exporter`.
  
      Args:
          export_path (str): file path of exported caffe2 model
          metric_channels: output the PyTorch model's execution graph to
          export_onnx_path (str):file path of exported onnx model
      """
      # Make sure to put the model on CPU and disable CUDA before exporting to
      # ONNX to disable any data_parallel pieces
      cuda.CUDA_ENABLED = False
      for name, model in multitask_model.models.items():
          model = model.cpu()
          if self.exporters[name]:
              self.exporters[name].export_to_metrics(
                  model, metric_channels
              )
              if name == self.target_task_name:
                  model_export_path = export_path
                  model_export_onnx_path = export_onnx_path
              else:
                  model_export_path = f"{export_path}-{name}"
                  model_export_onnx_path = (
                      f"{export_onnx_path}-{name}"
                      if export_onnx_path
                      else None
                  )
              print("Saving caffe2 model to: " + model_export_path)
              self.exporters[name].export_to_caffe2(
                  model, model_export_path, model_export_onnx_path
              )
  
imports: from collections import OrderedDict
  from pprint import pprint
  from typing import Dict, Optional
  from pytext.config import config_to_json
  from pytext.config.component import ComponentType, create_component, create_data_handler, create_exporter, create_featurizer, create_metric_reporter, create_model, create_optimizer, create_trainer
  from pytext.data import DisjointMultitaskData, DisjointMultitaskDataHandler
  from pytext.metric_reporters.disjoint_multitask_metric_reporter import DisjointMultitaskMetricReporter
  from pytext.models.disjoint_multitask_model import DisjointMultitaskModel, NewDisjointMultitaskModel
  from pytext.optimizer.scheduler import Scheduler
  from pytext.utils import cuda
  from pytext.utils.usage import log_class_usage
  from .None import _NewTask, NewTask, Task_Deprecated, TaskBase
label_desc: Use image node_id 3 for calling the DisjointMultitask obj's underlying member method code with example usage: obj.export(multitask_model, export_path, metric_channels, export_onnx_path) without return types