Skip to content

Commit 3295711

Browse files
authored
chore: clarify warning about missing model files (#1219)
1 parent a48b4a3 commit 3295711

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

model.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,11 @@ bool ModelLoader::init_from_file(const std::string& file_path, const std::string
376376
LOG_INFO("load %s using checkpoint format", file_path.c_str());
377377
return init_from_ckpt_file(file_path, prefix);
378378
} else {
379-
LOG_WARN("unknown format %s", file_path.c_str());
379+
if (file_exists(file_path)) {
380+
LOG_WARN("unknown format %s", file_path.c_str());
381+
} else {
382+
LOG_WARN("file %s not found", file_path.c_str());
383+
}
380384
return false;
381385
}
382386
}

0 commit comments

Comments
 (0)