code: def _build_model(self):
      self.model = torch.load(
          os.path.join(
              self.config["out_dir"], Constants._SAVED_WEIGHTS_FILE
          )
      ).to(self.device)
  
      self.inference_tool = GeneratorInferenceWrapper(
          cfg=self.config,
          model=self.model,
          dataset=DoubleText2TextDataset,
          data_item=DoubleText2TextDataItem,
          beam_size=self.config["beam_size"],
          topk=1,
          lower_case=True,
          tokenizer=word_tokenize,
          share_vocab=True,
      )
  
file_path: graph4nlp/examples/pytorch/question_generation/inference.py
imports: import argparse
  import os
  from typing import List, Tuple
  import numpy
  import torch
  from nltk.tokenize import word_tokenize
  from graph4nlp.pytorch.data.dataset import DoubleText2TextDataItem, DoubleText2TextDataset
  from graph4nlp.pytorch.inference_wrapper.generator_inference_wrapper import GeneratorInferenceWrapper
  from graph4nlp.pytorch.modules.config import get_basic_args
  from graph4nlp.pytorch.modules.utils import constants
  from graph4nlp.pytorch.modules.utils.config_utils import get_yaml_config, update_values
  from .main import QGModel
label_desc: Use image node_id 3 for calling the ModelHandler obj's underlying member method code with example usage: obj._build_model() without return types