package com.kamco.cd.training.train.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Properties;
import java.util.UUID;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

public class ModelTrainMetricsDto {

  @Schema(name = "ResponsePathDto", description = "AI 결과 저장된 path 경로 정보")
  @Getter
  @Setter
  @NoArgsConstructor
  @AllArgsConstructor
  public static class ResponsePathDto {

    private Long modelId;
    private String responsePath;
    private UUID uuid;
  }

  @Getter
  @AllArgsConstructor
  public static class ModelMetricJsonDto {

    @JsonProperty("cd_model_type")
    private String cdModelType;

    @JsonProperty("model_version")
    private String modelVersion;

    private Properties properties;
  }

  @Getter
  @AllArgsConstructor
  public static class Properties {

    @JsonProperty("f1_score")
    private Float f1Score;

    private Float precision;
    private Float recall;
    private Float loss;
    private Double iou;
  }

  @Getter
  @AllArgsConstructor
  public static class ModelTestFileName {

    private String bestEpochFileName;
    private String modelVersion;
  }
}
