class_docstr: Create a checkpoint for a given model
  
  Argumemnts:
      - load_dir: directory where to load the checkpoint from (if exists)
      - check_name: Name of the checkpoint (without the .pt extension)
      - selection_stage: Stage that is used for selecting the best model
      - run_config: Config of the run. In resume mode, this gets discarded
      - resume: Resume a previous training - this creates optimizers
      - strict: If strict and checkpoint is empty then it raises a ValueError. Being in resume mode forces strict
class_docstr_tok: ["Create","a","checkpoint","for","a","given","model","Argumemnts",":","-","load_dir",":","directory","where","to","load","the","checkpoint","from","(","if","exists",")","-","check_name",":","Name","of","the","checkpoint","(","without","the",".pt","extension",")","-","selection_stage",":","Stage","that","is","used","for","selecting","the","best","model","-","run_config",":","Config","of","the","run",".","In","resume","mode",",","this","gets","discarded","-","resume",":","Resume","a","previous","training","-","this","creates","optimizers","-","strict",":","If","strict","and","checkpoint","is","empty","then","it","raises","a","ValueError",".","Being","in","resume","mode","forces","strict"]
code: def __init__(
      self,
      load_dir: str,
      check_name: str,
      selection_stage: str,
      run_config: DictConfig = DictConfig({}),
      resume=False,
      strict=False,
  ):
      # Conversion of run_config to save a dictionary and not a pickle of omegaconf
      rc = OmegaConf.to_container(copy.deepcopy(run_config))
      self._checkpoint = Checkpoint.load(
          load_dir,
          check_name,
          run_config=rc,
          strict=strict,
          resume=resume,
      )
      self._resume = resume
      self._selection_stage = selection_stage
  
imports: from typing import Any, Dict, List, Optional, Tuple, Union
  import os
  import torch
  import logging
  import copy
  import glob
  import shutil
  from omegaconf import OmegaConf
  from omegaconf import DictConfig
  from torch_points3d.models import model_interface
  from torch_points3d.utils.colors import COLORS, colored_print
  from torch_points3d.core.schedulers.lr_schedulers import instantiate_scheduler
  from torch_points3d.core.schedulers.bn_schedulers import instantiate_bn_scheduler
  from torch_points3d.models.model_factory import instantiate_model
label_desc: Use image node_id 1 to create a new ModelCheckpoint object from inherited base classes: object with example: obj = ModelCheckpoint(load_dir, check_name, selection_stage, run_config, resume, strict)