2 Commits d5503f2dd2 ... 75c698f335

Auteur SHA1 Message Date
  WANGKANG 75c698f335 fix: 解决训练路径没有解压压缩包的问题 il y a 2 mois
  WANGKANG d5503f2dd2 fix: 解决训练路径没有解压压缩包的问题 il y a 2 mois

+ 7 - 6
taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/TrackSequenceServiceImpl.java

@@ -273,6 +273,13 @@ public class TrackSequenceServiceImpl extends BaseServiceImpl<TrackSequenceMappe
             throw new RuntimeException("算法配置参数为空");
         }
 
+        String unzipPath = getUnZipDirPath(ossEntity);
+        File file = new File(unzipPath);
+        if (!file.exists()) {
+            String resourcePath = getResourcePath(ossService.getById(entity.getInputOssId()));
+            ZipUtils.unzip(resourcePath, unzipPath);
+        }
+
         Map<String, Object> algorithmParameters = getAlgorithmParameters(algorithmConfig.getParameters(),
             entityBo.getOtherParams());
 
@@ -340,12 +347,6 @@ public class TrackSequenceServiceImpl extends BaseServiceImpl<TrackSequenceMappe
         // 步骤 5. 将算法参数map序列化为json字符串,保存到数据库中
         entity.setAlgorithmParameters(JsonUtils.toJsonString(result));
 
-        File file = new File(entity.getInputPath());
-        if (!file.exists()) {
-            String resourcePath = getResourcePath(ossService.getById(entity.getInputOssId()));
-            ZipUtils.unzip(resourcePath, entity.getInputPath());
-        }
-
         makeDir(entity.getInputPath());
         makeDir(entity.getOutputPath());