|
@@ -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);
|