Browse Source

优化主动学习

pull/227/head
chenzhihang 8 months ago
parent
commit
85c92e8fae
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ActiveLearnInsServiceImpl.java

+ 4
- 3
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ActiveLearnInsServiceImpl.java View File

@@ -153,7 +153,7 @@ public class ActiveLearnInsServiceImpl implements ActiveLearnInsService {
String phaseValue = (String) innerMap.get("phase");
// 如果值不等于 Succeeded,则赋值为 Failed
if (!StringUtils.equals(Constant.Succeeded, phaseValue)) {
innerMap.put("phase", Constant.Terminated);
innerMap.put("phase", Constant.Failed);
innerMap.put("finishedAt", new Date());
}
}
@@ -293,8 +293,9 @@ public class ActiveLearnInsServiceImpl implements ActiveLearnInsService {

public void getTrialList(ActiveLearnIns ins) throws IOException {
String directoryPath = ins.getResultPath();
Map<String, Object> stringObjectMap = JsonUtils.jsonToMap(ins.getParam());
String s = (String) stringObjectMap.get("framework_type");
Map<String, Object> paramMap = JsonUtils.jsonToMap(ins.getParam());
Map<String, Object> dataMap = (Map<String, Object>) paramMap.get("data");
String s = (String) dataMap.get("framework_type");
switch ((String) JsonUtils.jsonToMap(ins.getParam()).get("framework_type")) {
case Constant.AL_PYTORCH: {
ins.setResultPath(endpoint + "/" + directoryPath + "/final_checkpoint/final_model_weights.pth");


Loading…
Cancel
Save