class_docstr: Model exporter exports a PyTorch model to Caffe2 model using ONNX
  
  Attributes:
      input_names (List[Str]): names of the input variables to model forward
          function, in a flattened way.
          e.g: forward(tokens, dict) where tokens is List[Tensor] and dict is
          a tuple of value and length: (List[Tensor], List[Tensor]) the
          input names should looks like ['token', 'dict_value', 'dict_length']
      dummy_model_input (Tuple[torch.Tensor]): dummy values to define the
          shape of input tensors, should exactly match the shape of the model
          forward function
      vocab_map (Dict[str, List[str]]): dict of input feature names
          to corresponding index_to_string array, e.g:
          ::
  
              {
                  "text": ["<UNK>", "W1", "W2", "W3", "W4", "W5", "W6", "W7", "W8"],
                  "dict": ["<UNK>", "D1", "D2", "D3", "D4", "D5", "D6", "D7", "D8"]
              }
      output_names (List[Str]): names of output variables
docstr: Exports the pytorch model to tensorboard as a graph.
  
  Args:
      model (Model): pytorch model to export
      metric_channels (List[Channel]): outputs of model's execution graph
docstr_tok: ["Exports","the","pytorch","model","to","tensorboard","as","a","graph",".","Args",":","model","(","Model",")",":","pytorch","model","to","export","metric_channels","(","List","[","Channel","]",")",":","outputs","of","model","'s","execution","graph"]
code: def export_to_metrics(self, model, metric_channels):
      """
      Exports the pytorch model to tensorboard as a graph.
  
      Args:
          model (Model): pytorch model to export
          metric_channels (List[Channel]): outputs of model's execution graph
      """
  
      for mc in metric_channels or []:
          if self.config.export_raw_to_metrics:
              mc.export(
                  model,
                  self.dummy_model_input,
                  operator_export_type="RAW",
              )
          else:
              mc.export(model, self.dummy_model_input)
  
imports: import tempfile
  from typing import Callable, Dict, List, Tuple, Union
  import torch
  from caffe2.python import core
  from caffe2.python.onnx.backend_rep import Caffe2Rep
  from pytext.config import ConfigBase
  from pytext.config.component import Component, ComponentType
  from pytext.config.field_config import FeatureConfig
  from pytext.data import CommonMetadata
  from pytext.fields import FieldMeta
  from pytext.utils import onnx
  from pytext.utils.file_io import PathManager
  from pytext.utils.usage import log_class_usage
label_desc: Use image node_id 8 for calling the ModelExporter obj's underlying member method code with example usage: obj.export_to_metrics(model, metric_channels) without return types