containerName 생성 변경

This commit is contained in:
2026-02-12 11:42:38 +09:00
parent fd7dfd7e7f
commit 96035f864a
6 changed files with 29 additions and 5 deletions

View File

@@ -20,4 +20,6 @@ public class ModelTrainJobDto {
private ZonedDateTime queuedDttm;
private ZonedDateTime startedDttm;
private ZonedDateTime finishedDttm;
private Integer totalEpoch;
private Integer currentEpoch;
}

View File

@@ -87,7 +87,7 @@ public class DockerTrainService {
log.info("[EPOCH] container={} {}/{}", containerName, currentEpoch, totalEpoch);
// TODO 실행중인 에폭 저장 필요하면 만들어야함
// TODO 완료여부를 여기다가?
// TODO 하지만 여기서 트랜젝션 걸리는 db 작업하면 안좋다고하는데..?
// modelTrainMngCoreService.updateCurrentEpoch(modelId,
// currentEpoch, totalEpoch);
}

View File

@@ -58,6 +58,7 @@ public class TrainJobService {
Map<String, Object> paramsMap = objectMapper.convertValue(trainRunRequest, Map.class);
paramsMap.put("jobType", "TRAIN");
paramsMap.put("uuid", trainRunRequest.getUuid());
paramsMap.put("totalEpoch", trainRunRequest.getEpochs());
Long jobId =
modelTrainJobCoreService.createQueuedJob(

View File

@@ -47,9 +47,17 @@ public class TrainJobWorker {
boolean isEval = "EVAL".equals(jobType);
String containerName = (isEval ? "eval-" : "train-") + jobId + "-" + params.get("uuid");
String containerName =
(isEval ? "eval-" : "train-") + jobId + "-" + params.get("uuid").toString().substring(0, 8);
modelTrainJobCoreService.markRunning(jobId, containerName, null, "TRAIN_WORKER");
Integer totalEpoch = null;
if (params.containsKey("totalEpoch")) {
if (params.get("totalEpoch") != null) {
totalEpoch = Integer.parseInt(params.get("totalEpoch").toString());
}
}
modelTrainJobCoreService.markRunning(jobId, containerName, null, "TRAIN_WORKER", totalEpoch);
try {
TrainRunResult result;