package cn.iocoder.yudao.module.llm.controller.admin.training.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 训练新增/修改 Request VO")
@Data
public class TrainingSaveReqVO {

    @Schema(description = "自增ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11614")
    private Integer id;

    @Schema(description = "基座模型名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    @NotEmpty(message = "基座模型名称不能为空")
    private String modelName;

    @Schema(description = "介绍", example = "你说的对")
    private String description;

    @Schema(description = "训练轮次", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "训练轮次不能为空")
    private Integer trainingEpochs;

    @Schema(description = "启用Lora", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "启用Lora不能为空")
    private Boolean useLora;

    @Schema(description = "训练批次", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "训练批次不能为空")
    private Integer trainingBatchSize;

    @Schema(description = "评估批次", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "评估批次不能为空")
    private Integer evaluationBatchSize;

    @Schema(description = "梯度累加步数", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "梯度累加步数不能为空")
    private Integer gradientAccumulationSteps;

    @Schema(description = "使用GPU数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "22492")
    @NotNull(message = "使用GPU数量不能为空")
    private Integer gpuCount;

    @Schema(description = "学习率", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "学习率不能为空")
    private BigDecimal learningRate;

    @Schema(description = "最大长度", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "最大长度不能为空")
    private Integer maxLength;

    @Schema(description = "记录创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "记录创建时间不能为空")
    private LocalDateTime createdAt;

    @Schema(description = "记录更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "记录更新时间不能为空")
    private LocalDateTime updatedAt;

}