Fix gg_get_model function
ggml-ci
This commit is contained in:
parent
0e41cc3323
commit
aa4ebf6879
1 changed files with 13 additions and 16 deletions
29
ci/run.sh
29
ci/run.sh
|
@ -137,18 +137,23 @@ function gg_sum_ctest_release {
|
||||||
gg_printf '```\n'
|
gg_printf '```\n'
|
||||||
}
|
}
|
||||||
|
|
||||||
function gg_run_ctest_with_model_debug {
|
function gg_get_model {
|
||||||
cd ${SRC}
|
local gguf_3b="$MNT/models/open-llama/3B-v2/ggml-model-f16.gguf"
|
||||||
local model
|
local gguf_7b="$MNT/models/open-llama/7B-v2/ggml-model-f16.gguf"
|
||||||
if [[ -d $MNT/models/open-llama/3B-v2 ]]; then
|
if [[ -s $gguf_3b ]]; then
|
||||||
model="$MNT/models/open-llama/3B-v2/ggml-model-f16.gguf"
|
echo -n "$gguf_3b"
|
||||||
elif [[ -d $MNT/models/open-llama/7B-v2 ]]; then
|
elif [[ -s $gguf_7b ]]; then
|
||||||
model="$MNT/models/open-llama/7B-v2/ggml-model-f16.gguf"
|
echo -n "$gguf_7b"
|
||||||
else
|
else
|
||||||
echo >&2 "No model found. Can't run gg_run_ctest_with_model."
|
echo >&2 "No model found. Can't run gg_run_ctest_with_model."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function gg_run_ctest_with_model_debug {
|
||||||
|
cd ${SRC}
|
||||||
|
|
||||||
|
local model; model=$(gg_get_model)
|
||||||
cd build-ci-debug
|
cd build-ci-debug
|
||||||
set -e
|
set -e
|
||||||
(GG_RUN_CTEST_MODELFILE="$model" time ctest --output-on-failure -L model) 2>&1 | tee -a $OUT/${ci}-ctest.log
|
(GG_RUN_CTEST_MODELFILE="$model" time ctest --output-on-failure -L model) 2>&1 | tee -a $OUT/${ci}-ctest.log
|
||||||
|
@ -158,16 +163,8 @@ function gg_run_ctest_with_model_debug {
|
||||||
|
|
||||||
function gg_run_ctest_with_model_release {
|
function gg_run_ctest_with_model_release {
|
||||||
cd ${SRC}
|
cd ${SRC}
|
||||||
local model
|
|
||||||
if [[ -d $MNT/models/open-llama/3B-v2 ]]; then
|
|
||||||
model="$MNT/models/open-llama/3B-v2/ggml-model-f16.gguf"
|
|
||||||
elif [[ -d $MNT/models/open-llama/7B-v2 ]]; then
|
|
||||||
model="$MNT/models/open-llama/7B-v2/ggml-model-f16.gguf"
|
|
||||||
else
|
|
||||||
echo >&2 "No model found. Can't run gg_run_ctest_with_model."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
local model; model=$(gg_get_model)
|
||||||
cd build-ci-release
|
cd build-ci-release
|
||||||
set -e
|
set -e
|
||||||
(GG_RUN_CTEST_MODELFILE="$model" time ctest --output-on-failure -L model) 2>&1 | tee -a $OUT/${ci}-ctest.log
|
(GG_RUN_CTEST_MODELFILE="$model" time ctest --output-on-failure -L model) 2>&1 | tee -a $OUT/${ci}-ctest.log
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue