def __init__(self, trainer):
    '\n        Generates a path for saving model which can also be used for resuming\n        from a checkpoint.\n        '
    self.trainer = trainer
    self.config = self.trainer.config
    self.save_dir = self.config.training_parameters.save_dir
    self.model_name = self.config.model
    self.ckpt_foldername = ckpt_name_from_core_args(self.config)
    self.ckpt_foldername += foldername_from_config_override(self.trainer.args)
    self.device = registry.get('current_device')
    self.ckpt_prefix = ''
    if hasattr(self.trainer.model, 'get_ckpt_name'):
        self.ckpt_prefix = (self.trainer.model.get_ckpt_name() + '_')
    self.config['log_foldername'] = self.ckpt_foldername
    self.ckpt_foldername = os.path.join(self.save_dir, self.ckpt_foldername)
    self.pth_filepath = os.path.join(self.ckpt_foldername, (((self.ckpt_prefix + self.model_name) + getattr(self.config.model_attributes, self.model_name).code_name) + '_final.pth'))
    self.models_foldername = os.path.join(self.ckpt_foldername, 'models')
    if (not os.path.exists(self.models_foldername)):
        os.makedirs(self.models_foldername)
    self.save_config()
    self.repo_path = updir(os.path.abspath(__file__), n=3)
Generates a path for saving model which can also be used for resuming
from a checkpoint.
def __init__(self, trainer):
    '\n        Generates a path for saving model which can also be used for resuming\n        from a checkpoint.\n        '
    self.trainer = trainer
    self.config = self.trainer.config
    self.save_dir = self.config.training_parameters.save_dir
    self.model_name = self.config.model
    self.ckpt_foldername = ckpt_name_from_core_args(self.config)
    self.ckpt_foldername += foldername_from_config_override(self.trainer.args)
    self.device = registry.get('current_device')
    self.ckpt_prefix = 
    if hasattr(self.trainer.model, 'get_ckpt_name'):
        self.ckpt_prefix = (self.trainer.model.get_ckpt_name() + '_')
    self.config['log_foldername'] = self.ckpt_foldername
    self.ckpt_foldername = os.path.join(self.save_dir, self.ckpt_foldername)
    self.pth_filepath = os.path.join(self.ckpt_foldername, (((self.ckpt_prefix + self.model_name) + getattr(self.config.model_attributes, self.model_name).code_name) + '_final.pth'))
    self.models_foldername = os.path.join(self.ckpt_foldername, 'models')
    if (not os.path.exists(self.models_foldername)):
        os.makedirs(self.models_foldername)
    self.save_config()
    self.repo_path = updir(os.path.abspath(__file__), n=3)