From 88d66e9dce0a2755b0b74d599f522031ceccb793 Mon Sep 17 00:00:00 2001 From: Daniel King <43149077+dakinggg@users.noreply.github.com> Date: Thu, 6 Jun 2024 02:01:54 -0400 Subject: [PATCH] Fix MPT HF conversion (#1257) --- llmfoundry/utils/huggingface_hub_utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llmfoundry/utils/huggingface_hub_utils.py b/llmfoundry/utils/huggingface_hub_utils.py index 3f7b3a0f55..3038014d7f 100644 --- a/llmfoundry/utils/huggingface_hub_utils.py +++ b/llmfoundry/utils/huggingface_hub_utils.py @@ -280,6 +280,9 @@ def edit_files_for_hf_compatibility( for f in files_processed_and_queued } for entrypoint in entrypoint_files: + file_path = os.path.join(folder, entrypoint) + if not os.path.exists(file_path): + continue existing_relative_imports = get_all_relative_imports( os.path.join(folder, entrypoint), )