From 6881ec5fee9cd4f5eb7e8361e68e6f29b17ea301 Mon Sep 17 00:00:00 2001 From: Meleshko Ivan Date: Mon, 23 Sep 2024 23:24:08 +0200 Subject: [PATCH] Load .tar.gz on `load_models=all` (#3329) --- .../server/src/main/java/org/pytorch/serve/ModelServer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/server/src/main/java/org/pytorch/serve/ModelServer.java b/frontend/server/src/main/java/org/pytorch/serve/ModelServer.java index f5b02ee222..90f983333a 100644 --- a/frontend/server/src/main/java/org/pytorch/serve/ModelServer.java +++ b/frontend/server/src/main/java/org/pytorch/serve/ModelServer.java @@ -193,7 +193,8 @@ private void initModelStore() throws InvalidSnapshotException, IOException { String fileName = file.getName(); if (file.isFile() && !fileName.endsWith(".mar") - && !fileName.endsWith(".model")) { + && !fileName.endsWith(".model") + && !fileName.endsWith(".tar.gz")) { continue; } try {