class_docstr: Wrapper Class to run Inference.
  
  Args:
      opt: inference options
class_docstr_tok: ["Wrapper","Class","to","run","Inference",".","Args",":","opt",":","inference","options"]
code: def __init__(self, opt):
      self.opt = opt
  
imports: import json
  from onmt.constants import CorpusTask, DefaultTokens, ModelTask
  from onmt.inputters.dynamic_iterator import build_dynamic_dataset_iter
  from onmt.utils.distributed import ErrorHandler, spawned_infer
  from onmt.utils.logging import init_logger
  from onmt.transforms import get_transforms_cls, make_transforms, TransformPipe
label_desc: Use image node_id 1 to create a new InferenceEngine object from inherited base classes: object with example: obj = InferenceEngine(opt)