하이퍼 파라미터 수정 #109

Merged
teddy merged 1 commits from feat/training_260202 into develop 2026-02-13 15:00:51 +09:00

View File

@@ -194,32 +194,37 @@ public class TrainJobService {
Object out = paramsJson.get("outputFolder");
if (out == null) return null;
String outputFolder = String.valueOf(out).trim(); // uuid
String outputFolder = String.valueOf(out).trim();
if (outputFolder.isEmpty()) return null;
// 호스트 기준 경로
Path outDir = Paths.get(responseDir, outputFolder);
log.info("resume outDir response path: {}", outDir);
Path last = outDir.resolve("last_checkpoint");
log.info("resume last response path: {}", last);
if (!Files.isRegularFile(last)) return null;
try {
String ckptFile = Files.readString(last).trim(); // epoch_10.pth
ckptFile = ckptFile.replace("/checkpoints", responseDir);
log.info("resume ckptFile: {}", ckptFile);
// last_checkpoint 내용 그대로 읽기
String containerPath = Files.readString(last).trim();
log.info("resume containerPath: {}", containerPath);
if (ckptFile.isEmpty()) return null;
if (containerPath.isEmpty()) return null;
Path ckptHost = outDir.resolve(ckptFile);
log.info("resume ckptHost: {}", ckptHost);
if (!Files.isRegularFile(ckptHost)) return null;
// 호스트 경로로 변환해서 실제 파일 존재 확인
String hostPathStr = containerPath.replace("/checkpoints", responseDir);
Path hostPath = Paths.get(hostPathStr);
// 컨테이너 경로 반환
return ckptFile;
log.info("resume hostPath: {}", hostPath);
if (!Files.isRegularFile(hostPath)) return null;
// 3컨테이너 경로 그대로 반환
return containerPath;
} catch (Exception e) {
log.error("resume error", e);
return null;
}
}