fix: also fix find_model_files to use sys.argv
- Apply same sys.argv pattern to find_model_files function - Ensures all Python heredocs avoid bash interpolation issues 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -310,14 +310,14 @@ find_model_files() {
|
|||||||
local repo_id="$1"
|
local repo_id="$1"
|
||||||
local filename_filter="$2"
|
local filename_filter="$2"
|
||||||
|
|
||||||
python3 - <<EOPYFINDFIND
|
python3 <<EOPYFINDFIND - "$CACHE_DIR" "$repo_id" "$filename_filter"
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
cache_dir = '${CACHE_DIR}'
|
cache_dir = sys.argv[1]
|
||||||
repo_id = '${repo_id}'
|
repo_id = sys.argv[2]
|
||||||
filename_filter = '${filename_filter}'
|
filename_filter = sys.argv[3]
|
||||||
|
|
||||||
# HuggingFace cache structure: cache_dir/models--org--name/snapshots/hash/
|
# HuggingFace cache structure: cache_dir/models--org--name/snapshots/hash/
|
||||||
# Try both with and without 'hub/' subdirectory for compatibility
|
# Try both with and without 'hub/' subdirectory for compatibility
|
||||||
|
|||||||
Reference in New Issue
Block a user