class_docstr: A base runner for training without training tricks.
  Applying training tricks such as ensemble of template or verbalizer,
  or self-training can use other runner class.
  This class is specially implemented for classification.
  For generation task, though it can be integrated in this class
  via `task` option, we keep it as another class for simplicity.
  
  Args:
      model (:obj:`nn.Module`): One ``nn.Module`` object.
      train_dataloader (:obj:`PromptDataloader`, optional): The dataloader to bachify and process the training data.
      valid_dataloader (:obj:`PromptDataloader`, optionla): The dataloader to bachify and process the val data.
      test_dataloader (:obj:`PromptDataloader`, optional): The dataloader to bachify and process the test data.
      config (:obj:`CfgNode`): A configuration object.
      loss_function (:obj:`Callable`, optional): The loss function in the training process.
code: def load_checkpoint(self, ckpt: str, load_state=True) -> bool:
      logger.info(f"Loading Checkpoint {self.checkpoint_path(ckpt)}...")
      try:
          state_dict = torch.load(
              self.checkpoint_path(ckpt),
              pickle_module=dill,
              map_location="cpu",
          )
      except FileNotFoundError:
          logger.warning(
              f"Checkpoint {self.checkpoint_path(ckpt)} not found"
          )
          return False
  
      # load state to model
      self.model = self.inner_model
      self.model.load_state_dict(state_dict["state_dict"])
  
      if load_state:
          # load state to optimizers
          for optimizer, op_state in zip(
              self.optimizers, state_dict["optimizer"]
          ):
              if isinstance(optimizer, torch.optim.Optimizer):
                  optimizer.load_state_dict(op_state)
          for scheduler, sc_state in zip(
              self.schedulers, state_dict["scheduler"]
          ):
              if isinstance(
                  scheduler, torch.optim.lr_scheduler._LRScheduler
              ):
                  with warnings.catch_warnings(record=True):
                      scheduler.load_state_dict(sc_state)
  
          # load training state
          self.cur_epoch = state_dict["cur_epoch"] + 1
          self.best_score = state_dict["best_score"]
          self.global_step = state_dict["global_step"]
      logger.info(
          f"Load Checkpoint finished, the current validation metric: {state_dict['validation_metric']}"
      )
      return True
  
imports: import os, shutil
  import sys
  import torch
  from torch import nn
  from torch.nn.parallel.data_parallel import DataParallel
  from openprompt.utils.cuda import model_to_device
  from tensorboardX import SummaryWriter
  from tqdm import tqdm
  import dill
  import warnings
  from typing import Callable, Union, Dict
  from openprompt.pipeline_base import PromptForClassification, PromptForGeneration
  from openprompt import PromptDataLoader
  from openprompt.prompts import *
  from openprompt.utils.logging import logger
  from openprompt.utils.metrics import classification_metrics, generation_metric
  from transformers import AdamW, get_linear_schedule_with_warmup
  from transformers.optimization import Adafactor, AdafactorSchedule
label_desc: Use image node_id 10 for calling the BaseRunner obj's underlying member method code with example usage: obj.load_checkpoint(ckpt, load_state) and returns: True, False