class_docstr: Saves a LightningCLI config to the log_dir when training starts.
  
  Args:
      parser: The parser object used to parse the configuration.
      config: The parsed configuration that will be saved.
      config_filename: Filename for the config file.
      overwrite: Whether to overwrite an existing config file.
      multifile: When input is multiple config files, saved config preserves this structure.
      save_to_log_dir: Whether to save the config to the log_dir.
  
  Raises:
      RuntimeError: If the config file already exists in the directory to avoid overwriting a previous run
class_docstr_tok: ["Saves","a","LightningCLI","config","to","the","log_dir","when","training","starts",".","Args",":","parser",":","The","parser","object","used","to","parse","the","configuration",".","config",":","The","parsed","configuration","that","will","be","saved",".","config_filename",":","Filename","for","the","config","file",".","overwrite",":","Whether","to","overwrite","an","existing","config","file",".","multifile",":","When","input","is","multiple","config","files",",","saved","config","preserves","this","structure",".","save_to_log_dir",":","Whether","to","save","the","config","to","the","log_dir",".","Raises",":","RuntimeError",":","If","the","config","file","already","exists","in","the","directory","to","avoid","overwriting","a","previous","run"]
docstr: Implement to save the config in some other place additional to the standard log_dir.
  
  Example:
      def save_config(self, trainer, pl_module, stage):
          if isinstance(trainer.logger, Logger):
              config = self.parser.dump(self.config, skip_none=False)  # Required for proper reproducibility
              trainer.logger.log_hyperparams({"config": config})
  
  Note:
      This method is only called on rank zero. This allows to implement a custom save config without having to
      worry about ranks or race conditions. Since it only runs on rank zero, any collective call will make the
      process hang waiting for a broadcast. If you need to make collective calls, implement the setup method
      instead.
code: def save_config(
      self, trainer: Trainer, pl_module: LightningModule, stage: str
  ) -> None:
      """Implement to save the config in some other place additional to the standard log_dir.
  
      Example:
          def save_config(self, trainer, pl_module, stage):
              if isinstance(trainer.logger, Logger):
                  config = self.parser.dump(self.config, skip_none=False)  # Required for proper reproducibility
                  trainer.logger.log_hyperparams({"config": config})
  
      Note:
          This method is only called on rank zero. This allows to implement a custom save config without having to
          worry about ranks or race conditions. Since it only runs on rank zero, any collective call will make the
          process hang waiting for a broadcast. If you need to make collective calls, implement the setup method
          instead.
  
      """
  
imports: import os
  import sys
  from functools import partial, update_wrapper
  from types import MethodType
  from typing import Any, Callable, Dict, Iterable, List, Optional, Set, Tuple, Type, Union
  import torch
  from lightning_utilities.core.imports import RequirementCache
  from lightning_utilities.core.rank_zero import _warn
  from torch.optim import Optimizer
  from typing_extensions import override
  import lightning.pytorch
  from lightning.fabric.utilities.cloud_io import get_filesystem
  from lightning.fabric.utilities.types import _TORCH_LRSCHEDULER
  from lightning.pytorch import Callback, LightningDataModule, LightningModule, Trainer, seed_everything
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
  from lightning.pytorch.utilities.model_helpers import is_overridden
  from lightning.pytorch.utilities.rank_zero import rank_zero_warn
label_desc: Use image node_id 3 for calling the SaveConfigCallback obj's underlying member method code with example usage: obj.save_config(trainer, pl_module, stage) without return types