tests: unexpected vocab type as test fail instead of error
Useful when automating tests: - If you don't know in advance the vocab type. - Differenciate other loading errors.
This commit is contained in:
parent
b452e826cb
commit
9af762c0ac
2 changed files with 8 additions and 2 deletions
|
@ -63,7 +63,10 @@ int main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GGML_ASSERT(llama_vocab_type(model) == LLAMA_VOCAB_TYPE_BPE);
|
//GGML_ASSERT(llama_vocab_type(model) == LLAMA_VOCAB_TYPE_BPE);
|
||||||
|
if (llama_vocab_type(model) != LLAMA_VOCAB_TYPE_BPE) {
|
||||||
|
return 99;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// We need this for unicode console support
|
// We need this for unicode console support
|
||||||
|
|
|
@ -51,7 +51,10 @@ int main(int argc, char ** argv) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GGML_ASSERT(llama_vocab_type(model) == LLAMA_VOCAB_TYPE_SPM);
|
//GGML_ASSERT(llama_vocab_type(model) == LLAMA_VOCAB_TYPE_SPM);
|
||||||
|
if (llama_vocab_type(model) != LLAMA_VOCAB_TYPE_SPM) {
|
||||||
|
return 99;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// We need this for unicode console support
|
// We need this for unicode console support
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue