Merge remote-tracking branch 'origin/feat/training_260202' into feat/training_260202
This commit is contained in:
@@ -60,7 +60,7 @@ public class ModelTrainMngDto {
|
||||
}
|
||||
}
|
||||
|
||||
public String getStep2StatusNAme() {
|
||||
public String getStep2StatusName() {
|
||||
if (this.step2Status == null || this.step2Status.isBlank()) return null;
|
||||
try {
|
||||
return TrainStatusType.valueOf(this.step2Status).getText(); // 또는 getName()
|
||||
|
||||
@@ -42,7 +42,10 @@ public class ModelTestMetricsJobRepositoryImpl extends QuerydslRepositorySupport
|
||||
return queryFactory
|
||||
.select(
|
||||
Projections.constructor(
|
||||
ResponsePathDto.class, modelMasterEntity.id, modelMasterEntity.responsePath))
|
||||
ResponsePathDto.class,
|
||||
modelMasterEntity.id,
|
||||
modelMasterEntity.responsePath,
|
||||
modelMasterEntity.uuid))
|
||||
.from(modelMasterEntity)
|
||||
.where(
|
||||
modelMasterEntity.step2EndDttm.isNotNull(),
|
||||
|
||||
@@ -29,7 +29,10 @@ public class ModelTrainMetricsJobRepositoryImpl extends QuerydslRepositorySuppor
|
||||
return queryFactory
|
||||
.select(
|
||||
Projections.constructor(
|
||||
ResponsePathDto.class, modelMasterEntity.id, modelMasterEntity.responsePath))
|
||||
ResponsePathDto.class,
|
||||
modelMasterEntity.id,
|
||||
modelMasterEntity.responsePath,
|
||||
modelMasterEntity.uuid))
|
||||
.from(modelMasterEntity)
|
||||
.where(
|
||||
modelMasterEntity.step1EndDttm.isNotNull(),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.kamco.cd.training.train.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.util.UUID;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -17,5 +18,6 @@ public class ModelTrainMetricsDto {
|
||||
|
||||
private Long modelId;
|
||||
private String responsePath;
|
||||
private UUID uuid;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,10 @@ public class ModelTestMetricsJobService {
|
||||
@Value("${spring.profiles.active}")
|
||||
private String profile;
|
||||
|
||||
// 학습 결과가 저장될 호스트 디렉토리
|
||||
@Value("${train.docker.responseDir}")
|
||||
private String responseDir;
|
||||
|
||||
/**
|
||||
* 실행중인 profile
|
||||
*
|
||||
@@ -51,7 +55,7 @@ public class ModelTestMetricsJobService {
|
||||
|
||||
for (ResponsePathDto modelInfo : modelIds) {
|
||||
|
||||
String testPath = modelInfo.getResponsePath() + "/metrics/test.csv";
|
||||
String testPath = responseDir + "/" + modelInfo.getUuid() + "/metrics/test.csv";
|
||||
try (BufferedReader reader =
|
||||
Files.newBufferedReader(Paths.get(testPath), StandardCharsets.UTF_8); ) {
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ public class ModelTrainMetricsJobService {
|
||||
|
||||
for (ResponsePathDto modelInfo : modelIds) {
|
||||
|
||||
String trainPath = responseDir + "{uuid}/metrics/train.csv"; // TODO
|
||||
String trainPath = responseDir + "/" + modelInfo.getUuid() + "/metrics/train.csv";
|
||||
try (BufferedReader reader =
|
||||
Files.newBufferedReader(Paths.get(trainPath), StandardCharsets.UTF_8); ) {
|
||||
|
||||
@@ -80,7 +80,7 @@ public class ModelTrainMetricsJobService {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
String validationPath = modelInfo.getResponsePath() + "/metrics/val.csv";
|
||||
String validationPath = responseDir + "/" + modelInfo.getUuid() + "/metrics/val.csv";
|
||||
try (BufferedReader reader =
|
||||
Files.newBufferedReader(Paths.get(validationPath), StandardCharsets.UTF_8); ) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user