Skip to content

Commit 2796953

Browse files
committed
Revert "Fail test if model file is missing"
This reverts commit 32ebd52.
1 parent cb8a4be commit 2796953

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

tests/test-model-load-cancel.cpp

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,16 @@
11
#include "llama.h"
22

3-
#include <cstdio>
43
#include <cstdlib>
54

65
int main(void) {
7-
auto model_path = "models/7B/ggml-model-f16.gguf";
8-
auto file = fopen(model_path, "r");
9-
10-
if (file == nullptr) {
11-
fprintf(stderr, "no model at '%s' found\n", model_path);
12-
return EXIT_FAILURE;
13-
} else {
14-
fprintf(stderr, "using '%s'\n", model_path);
15-
fclose(file);
16-
}
17-
186
llama_backend_init(false);
197
auto params = llama_model_params{};
208
params.use_mmap = false;
219
params.progress_callback = [](float progress, void * ctx){
2210
(void) ctx;
2311
return progress > 0.50;
2412
};
25-
auto * model = llama_load_model_from_file(model_path, params);
13+
auto * model = llama_load_model_from_file("models/7B/ggml-model-f16.gguf", params);
2614
llama_backend_free();
2715
return model == nullptr ? EXIT_SUCCESS : EXIT_FAILURE;
2816
}

0 commit comments

Comments
 (0)