Skip to content

Commit 6febe36

Browse files
committed
add exception list
1 parent 2537273 commit 6febe36

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.github/workflows/_link_check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,6 @@ jobs:
7777
echo
7878
echo "File size lint failed: some files exceed the 1 MB limit."
7979
echo "If you really need large files, consider using Git LFS or storing them elsewhere."
80+
echo "If you really need to get unblocked and check in the file, can add it to the EXCEPTIONS list in scripts/lint_file_size.sh."
8081
exit 1
8182
}

scripts/lint_file_size.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,27 @@ status=0
1111

1212
green='\e[1;32m'; red='\e[1;31m'; cyan='\e[1;36m'; reset='\e[0m'
1313

14+
# List of files to skip (relative paths)
15+
EXCEPTIONS=(
16+
"examples/models/llama/params/demo_rand_params.pth"
17+
"examples/models/llama/tokenizer/test/resources/test_tiktoken_tokenizer.model"
18+
"examples/qualcomm/oss_scripts/llama/artifacts/stories260k_hybrid_llama_qnn.pte"
19+
# Following needs to be clean up
20+
"examples/mediatek/models/llm_models/weights/Llama-3.2-1B-Instruct/tokenizer.json"
21+
"examples/mediatek/models/llm_models/weights/Llama-3.2-3B-Instruct/tokenizer.json"
22+
"examples/mediatek/models/llm_models/weights/llama3-8B-instruct/tokenizer.json"
23+
)
24+
25+
is_exception() {
26+
local f=$1
27+
for ex in "${EXCEPTIONS[@]}"; do
28+
if [[ "$f" == "$ex" ]]; then
29+
return 0
30+
fi
31+
done
32+
return 1
33+
}
34+
1435
if [ $# -eq 2 ]; then
1536
base=$1
1637
head=$2
@@ -22,6 +43,10 @@ else
2243
fi
2344

2445
for file in $files; do
46+
if is_exception "$file"; then
47+
echo -e "${cyan}SKIP${reset} $file (in exception list)"
48+
continue
49+
fi
2550
if [ -f "$file" ]; then
2651
# Set size limit depending on extension
2752
if [[ "$file" =~ \.(png|jpg|jpeg|gif|svg|mp3|mp4)$ ]]; then

0 commit comments

Comments
 (0)