refactor(llm): 将学习率字段类型从 Integer 改为 BigDecimal
- 修改了 FineTuningTaskPageReqVO、FineTuningTaskRespVO 和 FineTuningTaskSaveReqVO 中的 learningRate 字段类型 - 优化了学习率的表示精度,提高了数据准确性
This commit is contained in:
parent
134473af14
commit
6d46498b5d
@ -1,6 +1,8 @@
|
||||
package cn.iocoder.yudao.module.llm.controller.admin.finetuningtask.vo;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
@ -43,7 +45,7 @@ public class FineTuningTaskPageReqVO extends PageParam {
|
||||
private Long dataset;
|
||||
|
||||
@Schema(description = "学习率")
|
||||
private Integer learningRate;
|
||||
private BigDecimal learningRate;
|
||||
|
||||
@Schema(description = "训练轮数")
|
||||
private Integer epoch;
|
||||
@ -94,4 +96,4 @@ public class FineTuningTaskPageReqVO extends PageParam {
|
||||
@Schema(description ="基础模型服务Id")
|
||||
private Long baseModelId;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,8 @@ import cn.iocoder.yudao.module.llm.service.http.vo.AigcFineTuningDetailRespVO;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
@ -58,7 +60,7 @@ public class FineTuningTaskRespVO {
|
||||
|
||||
@Schema(description = "学习率")
|
||||
@ExcelProperty("学习率")
|
||||
private Integer learningRate;
|
||||
private BigDecimal learningRate;
|
||||
|
||||
@Schema(description = "训练轮数")
|
||||
@ExcelProperty("训练轮数")
|
||||
|
@ -2,6 +2,8 @@ package cn.iocoder.yudao.module.llm.controller.admin.finetuningtask.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@ -41,7 +43,7 @@ public class FineTuningTaskSaveReqVO {
|
||||
private Long dataset;
|
||||
|
||||
@Schema(description = "学习率")
|
||||
private Integer learningRate;
|
||||
private BigDecimal learningRate;
|
||||
|
||||
@Schema(description = "训练轮数")
|
||||
private Integer epoch;
|
||||
@ -89,4 +91,4 @@ public class FineTuningTaskSaveReqVO {
|
||||
@Schema(description = "基础模型服务Id")
|
||||
private Long baseModelId;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -154,6 +154,7 @@ public class TrainHttpService {
|
||||
// TODO: 在上个方法中已经将数据集的文件id赋予,调试时需要写死再放开
|
||||
// String fileId = "6237ed4d-a046-479c-80d6-8579a0283994";
|
||||
// req.setFileId(fileId);
|
||||
log.info(" finetuningCreate:{}", JSON.toJSONString(req));
|
||||
String res = HttpUtils.post(llmBackendProperties.getFinetuningCreate(), headers, JSON.toJSONString(req));
|
||||
log.info(" finetuningCreate:{}", res);
|
||||
AigcRespVO aigcRespVO = JSON.parseObject(res, AigcRespVO.class);
|
||||
|
Loading…
x
Reference in New Issue
Block a user