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_model_type_from_config(config: ConfigType) -> str:
      if isinstance(config, ConfigReward):
          # here use ad-hoc flag from config to distinguish between
          #  reward and critic
          if config.is_reward:
              return "reward"
          else:
              return "critic"
      elif isinstance(config, ConfigActor):
          return "actor"
      elif isinstance(config, Config):
          return "actor_rl"
  
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 7 for calling the ModelLoader obj's underlying member method code with example usage: obj.get_model_type_from_config(config) and returns: str, str, str, str