|
|
|
@@ -171,7 +171,9 @@ public class RayInsServiceImpl implements RayInsService { |
|
|
|
if (Constant.Running.equals(rayIns.getStatus()) || Constant.Pending.equals(rayIns.getStatus())) { |
|
|
|
rayIns = queryStatusFromArgo(rayIns); |
|
|
|
} |
|
|
|
rayIns.setTrialList(getTrialList(rayIns.getResultPath())); |
|
|
|
getTrialList(rayIns); |
|
|
|
|
|
|
|
// rayIns.setTrialList(getTrialList(rayIns.getResultPath())); |
|
|
|
return rayIns; |
|
|
|
} |
|
|
|
|
|
|
|
@@ -265,12 +267,14 @@ public class RayInsServiceImpl implements RayInsService { |
|
|
|
return rayInsDao.queryByRayInsIsNotTerminated(); |
|
|
|
} |
|
|
|
|
|
|
|
public ArrayList<Map<String, Object>> getTrialList(String directoryPath) throws Exception { |
|
|
|
public void getTrialList(RayIns rayIns) throws Exception { |
|
|
|
// 获取指定路径下的所有文件 |
|
|
|
String directoryPath = rayIns.getResultPath(); |
|
|
|
String prefix = directoryPath.substring(directoryPath.indexOf("/") + 1, directoryPath.length()) + "/"; |
|
|
|
List<Map> maps = minioUtil.listFilesInDirectory(bucketName, prefix); |
|
|
|
|
|
|
|
if (!maps.isEmpty()) { |
|
|
|
rayIns.setFileList(maps); |
|
|
|
List<Map> collect = maps.stream().filter(map -> map.get("name").toString().startsWith("experiment_state")).collect(Collectors.toList()); |
|
|
|
if (!collect.isEmpty()) { |
|
|
|
Path experimentState = Paths.get(collect.get(0).get("name").toString()); |
|
|
|
@@ -298,9 +302,8 @@ public class RayInsServiceImpl implements RayInsService { |
|
|
|
|
|
|
|
trialList.add(trial); |
|
|
|
} |
|
|
|
return trialList; |
|
|
|
rayIns.setTrialList(trialList); |
|
|
|
} |
|
|
|
} |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |