전이학습 상세 수정
This commit is contained in:
@@ -7,6 +7,7 @@ import com.kamco.cd.training.model.dto.ModelConfigDto;
|
||||
import com.kamco.cd.training.model.dto.ModelTrainDetailDto.DetailSummary;
|
||||
import com.kamco.cd.training.model.dto.ModelTrainDetailDto.HyperSummary;
|
||||
import com.kamco.cd.training.model.dto.ModelTrainDetailDto.MappingDataset;
|
||||
import com.kamco.cd.training.model.dto.ModelTrainDetailDto.TransferHyperSummary;
|
||||
import com.kamco.cd.training.model.dto.ModelTrainMngDto.Basic;
|
||||
import com.kamco.cd.training.postgres.entity.ModelMasterEntity;
|
||||
import com.kamco.cd.training.postgres.repository.model.ModelConfigRepository;
|
||||
@@ -54,6 +55,10 @@ public class ModelTrainDetailCoreService {
|
||||
return modelDetailRepository.getByModelHyperParamSummary(uuid);
|
||||
}
|
||||
|
||||
public TransferHyperSummary getTransferHyperSummary(UUID uuid) {
|
||||
return modelDetailRepository.getByModelTransferHyperParamSummary(uuid);
|
||||
}
|
||||
|
||||
public List<MappingDataset> getByModelMappingDataset(UUID uuid) {
|
||||
return modelDetailRepository.getByModelMappingDataset(uuid);
|
||||
}
|
||||
|
||||
@@ -98,6 +98,7 @@ public class ModelTrainMngCoreService {
|
||||
entity.setHyperParamId(hyperParamEntity.getId());
|
||||
entity.setModelNo(addReq.getModelNo());
|
||||
entity.setTrainType(addReq.getTrainType()); // 일반, 전이
|
||||
entity.setBeforeModelId(addReq.getBeforeModelId());
|
||||
|
||||
if (addReq.getIsStart()) {
|
||||
entity.setModelStep((short) 1);
|
||||
|
||||
@@ -88,6 +88,9 @@ public class ModelMasterEntity {
|
||||
@Column(name = "train_type")
|
||||
private String trainType;
|
||||
|
||||
@Column(name = "before_model_id")
|
||||
private Long beforeModelId;
|
||||
|
||||
public ModelTrainMngDto.Basic toDto() {
|
||||
return new ModelTrainMngDto.Basic(
|
||||
this.id,
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.kamco.cd.training.postgres.repository.model;
|
||||
import com.kamco.cd.training.model.dto.ModelTrainDetailDto.DetailSummary;
|
||||
import com.kamco.cd.training.model.dto.ModelTrainDetailDto.HyperSummary;
|
||||
import com.kamco.cd.training.model.dto.ModelTrainDetailDto.MappingDataset;
|
||||
import com.kamco.cd.training.model.dto.ModelTrainDetailDto.TransferHyperSummary;
|
||||
import com.kamco.cd.training.postgres.entity.ModelMasterEntity;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
@@ -16,6 +17,8 @@ public interface ModelDetailRepositoryCustom {
|
||||
|
||||
HyperSummary getByModelHyperParamSummary(UUID uuid);
|
||||
|
||||
TransferHyperSummary getByModelTransferHyperParamSummary(UUID uuid);
|
||||
|
||||
List<MappingDataset> getByModelMappingDataset(UUID uuid);
|
||||
|
||||
ModelMasterEntity findByModelByUUID(UUID uuid);
|
||||
|
||||
@@ -9,7 +9,10 @@ import static com.kamco.cd.training.postgres.entity.QModelMasterEntity.modelMast
|
||||
import com.kamco.cd.training.model.dto.ModelTrainDetailDto.DetailSummary;
|
||||
import com.kamco.cd.training.model.dto.ModelTrainDetailDto.HyperSummary;
|
||||
import com.kamco.cd.training.model.dto.ModelTrainDetailDto.MappingDataset;
|
||||
import com.kamco.cd.training.model.dto.ModelTrainDetailDto.TransferHyperSummary;
|
||||
import com.kamco.cd.training.postgres.entity.ModelMasterEntity;
|
||||
import com.kamco.cd.training.postgres.entity.QModelHyperParamEntity;
|
||||
import com.kamco.cd.training.postgres.entity.QModelMasterEntity;
|
||||
import com.querydsl.core.types.Projections;
|
||||
import com.querydsl.jpa.JPAExpressions;
|
||||
import com.querydsl.jpa.impl.JPAQueryFactory;
|
||||
@@ -82,6 +85,41 @@ public class ModelDetailRepositoryImpl implements ModelDetailRepositoryCustom {
|
||||
.fetchOne();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TransferHyperSummary getByModelTransferHyperParamSummary(UUID uuid) {
|
||||
|
||||
QModelMasterEntity subMaster = new QModelMasterEntity("subMaster");
|
||||
QModelHyperParamEntity subHyper = new QModelHyperParamEntity("subHyper");
|
||||
|
||||
return queryFactory
|
||||
.select(
|
||||
Projections.constructor(
|
||||
TransferHyperSummary.class,
|
||||
modelHyperParamEntity.uuid,
|
||||
modelHyperParamEntity.id,
|
||||
modelHyperParamEntity.hyperVer,
|
||||
modelHyperParamEntity.backbone,
|
||||
modelHyperParamEntity.inputSize,
|
||||
modelHyperParamEntity.cropSize,
|
||||
modelHyperParamEntity.batchSize,
|
||||
subHyper.uuid,
|
||||
subHyper.id,
|
||||
subHyper.hyperVer,
|
||||
subHyper.backbone,
|
||||
subHyper.inputSize,
|
||||
subHyper.cropSize,
|
||||
subHyper.batchSize))
|
||||
.from(modelMasterEntity)
|
||||
.innerJoin(modelHyperParamEntity)
|
||||
.on(modelHyperParamEntity.id.eq(modelMasterEntity.hyperParamId))
|
||||
.leftJoin(subMaster)
|
||||
.on(subMaster.id.eq(modelMasterEntity.beforeModelId))
|
||||
.leftJoin(subHyper)
|
||||
.on(subHyper.id.eq(subMaster.hyperParamId))
|
||||
.where(modelMasterEntity.uuid.eq(uuid))
|
||||
.fetchOne();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MappingDataset> getByModelMappingDataset(UUID uuid) {
|
||||
return queryFactory
|
||||
|
||||
Reference in New Issue
Block a user