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","."]
docstr: Method to look for a particular checkpoint in the model folder
  checkpoint are saved as
  {model_name}_epoch_{current_epoch}_steps_{current_steps}.pt
  
  Args:
      model_folder (str): the folder where the checkpoints are saved
      checkpoint_name (str): the name of the checkpoint
docstr_tok: ["Method","to","look","for","a","particular","checkpoint","in","the","model","folder","checkpoint","are","saved","as","{","model_name","}","_epoch_","{","current_epoch","}","_steps_","{","current_steps","}",".pt","Args",":","model_folder","(","str",")",":","the","folder","where","the","checkpoints","are","saved","checkpoint_name","(","str",")",":","the","name","of","the","checkpoint"]
code: def look_for_checkpoint_by_name(
      model_folder: str,
      checkpoint_name: str,
  ) -> Optional[str]:
      """Method to look for a particular checkpoint in the model folder
      checkpoint are saved as
      {model_name}_epoch_{current_epoch}_steps_{current_steps}.pt
  
      Args:
          model_folder (str): the folder where the checkpoints are saved
          checkpoint_name (str): the name of the checkpoint
      """
      # look for a file named checkpoint_name in the model folder
      path = os.path.join(model_folder, checkpoint_name)
      if os.path.exists(path):
          return checkpoint_name
      else:
          return None
  
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 4 for calling the ModelLoader obj's underlying member method code with example usage: obj.look_for_checkpoint_by_name(model_folder, checkpoint_name) and returns: checkpoint_name, None