From ab67292aa39d1b0833a483362744a210f138ba16 Mon Sep 17 00:00:00 2001 From: Gifford Nowland Date: Tue, 10 Jun 2025 06:00:03 -0700 Subject: [PATCH] fix: silence deprecation in huggingface snapshot_download function (#8150) ### What problem does this PR solve? fixes the following deprecation emitted from `download_deps.py`: ``` UserWarning: `local_dir_use_symlinks` parameter is deprecated and will be ignored. The process to download files to a local folder has been updated and do not rely on symlinks anymore. You only need to pass a destination folder as`local_dir` ``` ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- download_deps.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/download_deps.py b/download_deps.py index 9bb6c74ba..058cf258b 100644 --- a/download_deps.py +++ b/download_deps.py @@ -50,7 +50,7 @@ repos = [ def download_model(repo_id): local_dir = os.path.abspath(os.path.join("huggingface.co", repo_id)) os.makedirs(local_dir, exist_ok=True) - snapshot_download(repo_id=repo_id, local_dir=local_dir, local_dir_use_symlinks=False) + snapshot_download(repo_id=repo_id, local_dir=local_dir) if __name__ == "__main__": @@ -74,4 +74,4 @@ if __name__ == "__main__": for repo_id in repos: print(f"Downloading huggingface repo {repo_id}...") - download_model(repo_id) \ No newline at end of file + download_model(repo_id)