class_docstr: The base class for an AllenNLP trainer. It can do pretty much
  anything you want. Your subclass should implement `train`
  and also probably `from_params`.
class_docstr_tok: ["The","base","class","for","an","AllenNLP","trainer",".","It","can","do","pretty","much","anything","you","want",".","Your","subclass","should","implement","`","train","`","and","also","probably","`","from_params","`","."]
docstr: Returns a tuple of (model state, training state), where training state could have several
  internal components (e.g., for an, optimizer, learning rate scheduler, etc.).
docstr_tok: ["Returns","a","tuple","of","(","model","state",",","training","state",")",",","where","training","state","could","have","several","internal","components","(","e.g.",",","for","an",",","optimizer",",","learning","rate","scheduler",",","etc",".",")","."]
code: def get_checkpoint_state(self) -> Optional[TrainerCheckpoint]:
      """
      Returns a tuple of (model state, training state), where training state could have several
      internal components (e.g., for an, optimizer, learning rate scheduler, etc.).
      """
      raise NotImplementedError
  
file_path: allennlp/allennlp/training/trainer.py
imports: import logging
  import os
  from typing import Any, Dict, Optional, Union, NamedTuple
  import torch.optim.lr_scheduler
  from allennlp.common import Registrable
  from allennlp.common.checks import ConfigurationError, check_for_gpu
  from allennlp.common.util import int_to_device
label_desc: Use image node_id 3 for calling the Trainer obj's underlying member method code with example usage: obj.get_checkpoint_state() without return types