class_docstr: A trainer for `AbstractComponent`s. Used mainly for supervised learning.
  
  Create a `ModelTrainer` by passing a `AbstractNeuralModel` in the constructor.
  Invoke `train()` to initiate the training loop. The root `TNeuralModule` should return a scalar loss.
class_docstr_tok: ["A","trainer","for","`","AbstractComponent","`","s",".","Used","mainly","for","supervised","learning",".","Create","a","`","ModelTrainer","`","by","passing","a","`","AbstractNeuralModel","`","in","the","constructor",".","Invoke","`","train","(",")","`","to","initiate","the","training","loop",".","The","root","`","TNeuralModule","`","should","return","a","scalar","loss","."]
code: def _save_checkpoint(self) -> None:
      self.__model.save(self._checkpoint_location, self.neural_module)
  
imports: from typing_extensions import Final, Protocol
  import json
  import logging
  import math
  import time
  import torch
  from pathlib import Path
  from tqdm import tqdm
  from typing import Callable, Dict, Generic, Iterable, List, Optional, TypeVar
  from ptgnn.baseneuralmodel.abstractneuralmodel import AbstractNeuralModel
  from ptgnn.baseneuralmodel.modulewithmetrics import ModuleWithMetrics
  from ptgnn.baseneuralmodel.utils.data import MemorizedDataIterable
  from ptgnn.baseneuralmodel.utils.oom import catch_cuda_oom
label_desc: Use image node_id 7 for calling the ModelTrainer obj's underlying member method code with example usage: obj._save_checkpoint() without return types