Skip to content

Commit

Permalink
[serving] Fixes onnx model conversion bug (#2000)
Browse files Browse the repository at this point in the history
  • Loading branch information
frankfliu authored May 30, 2024
1 parent 2bf31b6 commit 9902e98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wlm/src/main/java/ai/djl/serving/wlm/LmiUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ static void convertTrtLLM(ModelInfo<?, ?> info) throws IOException {

static void convertOnnxModel(ModelInfo<?, ?> info) throws IOException {
String prefix = info.prop.getProperty("option.modelName", info.modelDir.toFile().getName());
if (Files.isRegularFile(info.modelDir.resolve(prefix + ".onnx"))
if (Files.isRegularFile(info.modelDir)
|| Files.isRegularFile(info.modelDir.resolve(prefix + ".onnx"))
|| Files.isRegularFile(info.modelDir.resolve("model.onnx"))) {
return;
}
Expand Down

0 comments on commit 9902e98

Please sign in to comment.