From b3b70fc0b5ff3d561f2e4753e004f90cced6784e Mon Sep 17 00:00:00 2001 From: Saaketh Date: Mon, 29 Jul 2024 12:07:40 -0400 Subject: [PATCH] yo --- llmfoundry/callbacks/hf_checkpointer.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/llmfoundry/callbacks/hf_checkpointer.py b/llmfoundry/callbacks/hf_checkpointer.py index 303208ed6b..4eabd8a060 100644 --- a/llmfoundry/callbacks/hf_checkpointer.py +++ b/llmfoundry/callbacks/hf_checkpointer.py @@ -217,10 +217,13 @@ def __init__( ) self.mlflow_logging_config = mlflow_logging_config - self.pretrained_model_name = self.mlflow_logging_config['metadata'].get( - 'pretrained_model_name', - None, - ) + if 'metadata' in self.mlflow_logging_config: + self.pretrained_model_name = self.mlflow_logging_config['metadata'].get( + 'pretrained_model_name', + None, + ) + else: + self.pretrained_model_name = None self.huggingface_folder_name_fstr = os.path.join( 'huggingface',