feat/training_260202 #56

Merged
gina merged 3 commits from feat/training_260202 into develop 2026-02-12 17:00:09 +09:00
6 changed files with 18 additions and 6 deletions
Showing only changes of commit 9958b0999a - Show all commits

View File

@@ -60,7 +60,7 @@ public class ModelTrainMngDto {
} }
} }
public String getStep2StatusNAme() { public String getStep2StatusName() {
if (this.step2Status == null || this.step2Status.isBlank()) return null; if (this.step2Status == null || this.step2Status.isBlank()) return null;
try { try {
return TrainStatusType.valueOf(this.step2Status).getText(); // 또는 getName() return TrainStatusType.valueOf(this.step2Status).getText(); // 또는 getName()

View File

@@ -42,7 +42,10 @@ public class ModelTestMetricsJobRepositoryImpl extends QuerydslRepositorySupport
return queryFactory return queryFactory
.select( .select(
Projections.constructor( Projections.constructor(
ResponsePathDto.class, modelMasterEntity.id, modelMasterEntity.responsePath)) ResponsePathDto.class,
modelMasterEntity.id,
modelMasterEntity.responsePath,
modelMasterEntity.uuid))
.from(modelMasterEntity) .from(modelMasterEntity)
.where( .where(
modelMasterEntity.step2EndDttm.isNotNull(), modelMasterEntity.step2EndDttm.isNotNull(),

View File

@@ -29,7 +29,10 @@ public class ModelTrainMetricsJobRepositoryImpl extends QuerydslRepositorySuppor
return queryFactory return queryFactory
.select( .select(
Projections.constructor( Projections.constructor(
ResponsePathDto.class, modelMasterEntity.id, modelMasterEntity.responsePath)) ResponsePathDto.class,
modelMasterEntity.id,
modelMasterEntity.responsePath,
modelMasterEntity.uuid))
.from(modelMasterEntity) .from(modelMasterEntity)
.where( .where(
modelMasterEntity.step1EndDttm.isNotNull(), modelMasterEntity.step1EndDttm.isNotNull(),

View File

@@ -1,6 +1,7 @@
package com.kamco.cd.training.train.dto; package com.kamco.cd.training.train.dto;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import java.util.UUID;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
@@ -17,5 +18,6 @@ public class ModelTrainMetricsDto {
private Long modelId; private Long modelId;
private String responsePath; private String responsePath;
private UUID uuid;
} }
} }

View File

@@ -27,6 +27,10 @@ public class ModelTestMetricsJobService {
@Value("${spring.profiles.active}") @Value("${spring.profiles.active}")
private String profile; private String profile;
// 학습 결과가 저장될 호스트 디렉토리
@Value("${train.docker.responseDir}")
private String responseDir;
/** /**
* 실행중인 profile * 실행중인 profile
* *
@@ -51,7 +55,7 @@ public class ModelTestMetricsJobService {
for (ResponsePathDto modelInfo : modelIds) { for (ResponsePathDto modelInfo : modelIds) {
String testPath = modelInfo.getResponsePath() + "/metrics/test.csv"; String testPath = responseDir + "/" + modelInfo.getUuid() + "/metrics/test.csv";
try (BufferedReader reader = try (BufferedReader reader =
Files.newBufferedReader(Paths.get(testPath), StandardCharsets.UTF_8); ) { Files.newBufferedReader(Paths.get(testPath), StandardCharsets.UTF_8); ) {

View File

@@ -55,7 +55,7 @@ public class ModelTrainMetricsJobService {
for (ResponsePathDto modelInfo : modelIds) { for (ResponsePathDto modelInfo : modelIds) {
String trainPath = responseDir + "{uuid}/metrics/train.csv"; // TODO String trainPath = responseDir + "/" + modelInfo.getUuid() + "/metrics/train.csv";
try (BufferedReader reader = try (BufferedReader reader =
Files.newBufferedReader(Paths.get(trainPath), StandardCharsets.UTF_8); ) { Files.newBufferedReader(Paths.get(trainPath), StandardCharsets.UTF_8); ) {
@@ -80,7 +80,7 @@ public class ModelTrainMetricsJobService {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
String validationPath = modelInfo.getResponsePath() + "/metrics/val.csv"; String validationPath = responseDir + "/" + modelInfo.getUuid() + "/metrics/val.csv";
try (BufferedReader reader = try (BufferedReader reader =
Files.newBufferedReader(Paths.get(validationPath), StandardCharsets.UTF_8); ) { Files.newBufferedReader(Paths.get(validationPath), StandardCharsets.UTF_8); ) {