Unverified Commit 9627c3da authored by Younes Belkada's avatar Younes Belkada Committed by GitHub
Browse files

Fix PEFT integration failures on nightly CI (#25624)

fix PEFT integration failures
parent f92cc703
......@@ -59,7 +59,9 @@ def find_adapter_config_file(
are on HuggingFace Hub. You might need to call `huggingface-cli login` and paste your tokens to cache it.
"""
adapter_cached_filename = None
if os.path.isdir(model_id):
if model_id is None:
return None
elif os.path.isdir(model_id):
list_remote_files = os.listdir(model_id)
if ADAPTER_CONFIG_NAME in list_remote_files:
adapter_cached_filename = os.path.join(model_id, ADAPTER_CONFIG_NAME)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment