class_docstr: Class that customizes how checkpoints are saved. Saves either the entire model or only parameters that have been explicitly updated during training. The latter reduces memory footprint substantially when training very large models with parameter-efficient finetuning methods.
  Class is based on plugins.TorchCheckpointIO.
docstr: Parameters
  ----------
  trainable_param_names
      A list of regular expressions or exact names of layers to filter which parameters should be saved. If empty save entire model.
  model_name_to_id
      A dictionary mapping the layer names (keys) of the model to their ids (values).
docstr_tok: ["Parameters","--","--","--","--","--","trainable_param_names","A","list","of","regular","expressions","or","exact","names","of","layers","to","filter","which","parameters","should","be","saved",".","If","empty","save","entire","model",".","model_name_to_id","A","dictionary","mapping","the","layer","names","(","keys",")","of","the","model","to","their","ids","(","values",")","."]
code: def __init__(self, trainable_param_names, model_name_to_id):
      """
      Parameters
      ----------
      trainable_param_names
          A list of regular expressions or exact names of layers to filter which parameters should be saved. If empty save entire model.
      model_name_to_id
          A dictionary mapping the layer names (keys) of the model to their ids (values).
      """
      super().__init__()
      self.trainable_param_names = trainable_param_names
      self.model_name_to_id = model_name_to_id
  
imports: import logging
  import os
  import re
  import shutil
  from typing import Any, Dict, List, Optional, Tuple, Union
  import lightning.pytorch
  import torch
  from lightning.pytorch.strategies import DeepSpeedStrategy
  from lightning.pytorch.utilities.rank_zero import rank_zero_warn
  from .cloud_io import _atomic_save
  from .cloud_io import _load
  from .cloud_io import get_filesystem
label_desc: Use image node_id 1 to create a new AutoMMModelCheckpointIO object from inherited base classes: pl.plugins with example: obj = AutoMMModelCheckpointIO(trainable_param_names, model_name_to_id)