class_docstr: Class to load and save models and their checkpoints during training.
class_docstr_tok: ["Class","to","load","and","save","models","and","their","checkpoints","during","training","."]
code: def get_base_model_folder_from_config(config: ConfigType) -> str:
      if isinstance(config, ConfigActor) or isinstance(
          config, ConfigReward
      ):
          return config.model_folder
      elif isinstance(config, Config):
          return config.actor.model_folder
      else:
          raise ValueError(
              "Config type not recognized during saving or loading"
          )
  
file_path: nebuly/optimization/chatllama/chatllama/rlhf/model_loader.py
imports: import os
  import shutil
  from beartype.typing import Union, Optional, Tuple
  from chatllama.rlhf.config import Config, ConfigActor, ConfigCritic, ConfigReward
  from chatllama.rlhf.model_list import hf_models
label_desc: Use image node_id 6 for calling the ModelLoader obj's underlying member method code with example usage: obj.get_base_model_folder_from_config(config) and returns: config, config