summaryrefslogtreecommitdiff
path: root/scripts/check-requirements.sh
diff options
context:
space:
mode:
authorKawrakow <48489457+ikawrakow@users.noreply.github.com>2024-07-27 07:55:01 +0200
committerGitHub <noreply@github.com>2024-07-27 07:55:01 +0200
commit154e0d75fccf1784fe9ff6fd76a630b66563da3d (patch)
tree81ce6dbb5b1900c1aa78a879f0593c694cab9d27 /scripts/check-requirements.sh
parent0684c3e9c70d49323b4fc517128cbe222cab7f96 (diff)
Merge mainline llama.cpp (#3)
* Merging mainline - WIP * Merging mainline - WIP AVX2 and CUDA appear to work. CUDA performance seems slightly (~1-2%) lower as it is so often the case with llama.cpp/ggml after some "improvements" have been made. * Merging mainline - fix Metal * Remove check --------- Co-authored-by: Iwan Kawrakow <iwan.kawrakow@gmail.com>
Diffstat (limited to 'scripts/check-requirements.sh')
-rwxr-xr-xscripts/check-requirements.sh26
1 files changed, 13 insertions, 13 deletions
diff --git a/scripts/check-requirements.sh b/scripts/check-requirements.sh
index 0c6afdd5..d3bbded1 100755
--- a/scripts/check-requirements.sh
+++ b/scripts/check-requirements.sh
@@ -97,9 +97,9 @@ check_requirements() {
}
check_convert_script() {
- local py=$1 # e.g. ./convert-hf-to-gguf.py
- local pyname=${py##*/} # e.g. convert-hf-to-gguf.py
- pyname=${pyname%.py} # e.g. convert-hf-to-gguf
+ local py=$1 # e.g. ./convert_hf_to_gguf.py
+ local pyname=${py##*/} # e.g. convert_hf_to_gguf.py
+ pyname=${pyname%.py} # e.g. convert_hf_to_gguf
info "$py: beginning check"
@@ -108,6 +108,11 @@ check_convert_script() {
fatal "$py missing requirements. Expected: $reqs"
fi
+ # Check that all sub-requirements are added to top-level requirements.txt
+ if ! grep -qF "$reqs" requirements.txt; then
+ fatal "$reqs needs to be added to requirements.txt"
+ fi
+
local venv="$workdir/$pyname-venv"
python3 -m venv "$venv"
@@ -134,12 +139,7 @@ EOF
readonly ignore_eq_eq='check_requirements: ignore "=="'
-for req in "$reqs_dir"/*; do
- # Check that all sub-requirements are added to top-level requirements.txt
- if ! grep -qF "$req" requirements.txt; then
- fatal "$req needs to be added to requirements.txt"
- fi
-
+for req in */**/requirements*.txt; do
# Make sure exact release versions aren't being pinned in the requirements
# Filters out the ignore string
if grep -vF "$ignore_eq_eq" "$req" | grep -q '=='; then
@@ -166,12 +166,12 @@ if (( do_cleanup )); then
rm -rf -- "$all_venv"
fi
-check_convert_script examples/convert-legacy-llama.py
-for py in convert-*.py; do
- # skip convert-hf-to-gguf-update.py
+check_convert_script examples/convert_legacy_llama.py
+for py in convert_*.py; do
+ # skip convert_hf_to_gguf_update.py
# TODO: the check is failing for some reason:
# https://github.com/ggerganov/llama.cpp/actions/runs/8875330981/job/24364557177?pr=6920
- [[ $py == convert-hf-to-gguf-update.py ]] && continue
+ [[ $py == convert_hf_to_gguf_update.py ]] && continue
check_convert_script "$py"
done