code: def load_model_checkpoint(
      self, model, suffix, continue_training=True
  ):
      path_ckpt = join(self.config["log_dir"], f"model_{suffix}.bin")
      checkpoint = torch.load(
          path_ckpt, map_location=torch.device("cpu")
      )
  
      if type(checkpoint) is dict:
          model.load_state_dict(
              checkpoint["model_state_dict"], strict=False
          )
          if continue_training:
              self.optimizer = self.get_optimizer(model)
  
              epochs, grad_accum = (
                  self.config["num_epochs"],
                  self.config["gradient_accumulation_steps"],
              )
              batch_size = self.config["batch_size"]
              total_update_steps = (
                  len(self.data.get_tensor_examples()[0])
                  * epochs
                  // (grad_accum * batch_size)
              )
              self.scheduler = self.get_scheduler(
                  self.optimizer, total_update_steps
              )
              self.optimizer.load_state_dict(
                  checkpoint["optimizer_state_dict"]
              )
              self.scheduler.load_state_dict(
                  checkpoint["scheduler_state_dict"]
              )
              current_epoch = checkpoint["current_epoch"]
  
              logger.info(
                  "Loaded model, optmizer, scheduler from %s"
                  % path_ckpt
              )
              return model, current_epoch
          else:
              return model, -1
      else:
          model.load_state_dict(checkpoint, strict=False)
          logger.info("Loaded model from %s" % path_ckpt)
          return model, -1
  
imports: import sys
  import os
  import logging
  import random
  import numpy
  import torch
  from torch import nn
  from torch.optim import AdamW
  from util.multigpu_fused_adam import FusedAdam
  from torch.optim.lr_scheduler import LambdaLR
  from torch.utils.data import DataLoader
  import time
  from os.path import join
  from datetime import datetime
  import util
  from util.tensorize_coref import CorefDataProcessor, coref_collate_fn
  from util.tensorize_ner import NERDataProcessor, ner_collate_fn
  from util.tensorize_ere import EREDataProcessor, ere_collate_fn
  from metrics import CorefEvaluator, MentionEvaluator
  from models.model_coref import CorefModel
  from models.model_ner import NERModel
  from models.model_ere import EREModel
  import wandb
label_desc: Use image node_id 8 for calling the Runner obj's underlying member method code with example usage: obj.load_model_checkpoint(model, suffix, continue_training) and returns: model,  unknown, model,  current_epoch, model,  unknown