allen 3 weeks ago
parent
commit
5b51af71e9

+ 4 - 3
ips-admin/src/main/java/com/ips/system/service/impl/BizTrainingServiceImpl.java

@@ -133,18 +133,19 @@ public class BizTrainingServiceImpl implements IBizTrainingService {
         String inputPath = training.getInputPath();
         String outputPath = training.getOutputPath();
         ObjectMapper objectMapper = new ObjectMapper();
-        Map<String, Object> params = new HashMap<>(0);
-        params.put("model", training.getModelPath());
+        Map<String, Object> params = new HashMap<>(2);
+
         String errorMsg = "";
         try {
             if (StringUtils.isNotEmpty(training.getAlgorithmParams())) {
 
-                objectMapper.readValue(
+                params = objectMapper.readValue(
                         training.getAlgorithmParams(),
                         new TypeReference<Map<String, Object>>() {
                         }
                 );
             }
+            params.put("model", training.getModelPath());
             AlgorithmParamsDto algorithmParamsDto = new AlgorithmParamsDto(algorithmConfig.getAlgorithmName(), inputPath, outputPath, params);
             // 对象 → JSON 字符串
             String json = objectMapper.writeValueAsString(algorithmParamsDto);

+ 4 - 4
ips-admin/src/main/java/com/ips/system/service/impl/ClassifyTestServiceImpl.java

@@ -139,19 +139,19 @@ public class ClassifyTestServiceImpl implements IClassifyTestService
         String inputPath = classifyTest.getInputPath();
         String outputPath = classifyTest.getOutputPath();
         ObjectMapper objectMapper = new ObjectMapper();
-        Map<String, Object> params = new HashMap<>(0);
-        params.put("model", classifyTest.getModelPath());
-        params.put("mode_pkl", classifyTest.getModelPklPath());
+        Map<String, Object> params = new HashMap<>(2);
         String errorMsg = "";
         try {
             if (StringUtils.isNotEmpty(classifyTest.getAlgorithmParams())) {
 
-                objectMapper.readValue(
+                params = objectMapper.readValue(
                         classifyTest.getAlgorithmParams(),
                         new TypeReference<Map<String, Object>>() {
                         }
                 );
             }
+            params.put("model", classifyTest.getModelPath());
+            params.put("mode_pkl", classifyTest.getModelPklPath());
             AlgorithmParamsDto algorithmParamsDto = new AlgorithmParamsDto(algorithmConfig.getAlgorithmName(), inputPath, outputPath, params);
             // 对象 → JSON 字符串
             String json = objectMapper.writeValueAsString(algorithmParamsDto);

+ 3 - 3
ips-admin/src/main/java/com/ips/system/service/impl/DistillationServiceImpl.java

@@ -139,18 +139,18 @@ public class DistillationServiceImpl implements IDistillationService
         String inputPath = distillation.getInputPath();
         String outputPath = distillation.getOutputPath();
         ObjectMapper objectMapper = new ObjectMapper();
-        Map<String, Object> params = new HashMap<>(0);
-        params.put("model", distillation.getModelPath());
+        Map<String, Object> params = new HashMap<>(2);
         String errorMsg = "";
         try {
             if (StringUtils.isNotEmpty(distillation.getAlgorithmParams())) {
 
-                objectMapper.readValue(
+                params = objectMapper.readValue(
                         distillation.getAlgorithmParams(),
                         new TypeReference<Map<String, Object>>() {
                         }
                 );
             }
+            params.put("model", distillation.getModelPath());
             AlgorithmParamsDto algorithmParamsDto = new AlgorithmParamsDto(algorithmConfig.getAlgorithmName(), inputPath, outputPath, params);
             // 对象 → JSON 字符串
             String json = objectMapper.writeValueAsString(algorithmParamsDto);

+ 1 - 1
ips-admin/src/main/java/com/ips/system/service/impl/ExtractedFeaturesServiceImpl.java

@@ -145,7 +145,7 @@ public class ExtractedFeaturesServiceImpl implements IExtractedFeaturesService
         try {
             if (StringUtils.isNotEmpty(extractedFeatures.getAlgorithmParams())) {
 
-                objectMapper.readValue(
+                params = objectMapper.readValue(
                         extractedFeatures.getAlgorithmParams(),
                         new TypeReference<Map<String, Object>>() {
                         }

+ 1 - 1
ips-admin/src/main/resources/logback.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
     <!-- 日志存放路径 -->
-	<property name="log.path" value="/nupu-ips/logs" />
+	<property name="log.path" value="/ips/logs" />
     <!-- 日志输出格式 -->
 	<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />