File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 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 }
Original file line number Diff line number Diff line change @@ -11,6 +11,27 @@ status=0
1111
1212green=' \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+
1435if [ $# -eq 2 ]; then
1536 base=$1
1637 head=$2
2243fi
2344
2445for 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
You can’t perform that action at this time.
0 commit comments