class_docstr: ParlAI agent exported to TorchScript with JIT compilation and then loaded from disk.
  
  Metrics and batch act are currently unsupported, and CUDA is unsupported because
  TorchScripting is currently CPU-only.
code: def __init__(self, opt: Opt, shared=None):
      super().__init__(opt=opt, shared=shared)
      with PathManager.open(self.opt["model_file"], "rb") as f:
          self.module = torch.jit.load(f)
  
      # Track incoming history strings
      self.history: List[str] = []
  
file_path: ParlAI/parlai/torchscript/agents.py
imports: from typing import List
  import torch
  from parlai.core.agents import Agent
  from parlai.core.message import Message
  from parlai.core.opt import Opt
  from parlai.utils.io import PathManager
label_desc: Use image node_id 1 to create a new TorchScriptAgent object from inherited base classes: Agent with example: obj = TorchScriptAgent(opt, shared)