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

import java.util.UUID;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class TrainRunRequest {

  // ========================
  // 기본
  // ========================
  private String datasetFolder;
  private UUID outputFolder;
  private String inputSize;
  private String cropSize;
  private Integer batchSize;
  private String gpuIds;
  private Integer gpus;
  private Double learningRate;
  private String backbone;
  private Integer epochs;

  // ========================
  // Data
  // ========================
  private Integer trainNumWorkers;
  private Integer valNumWorkers;
  private Integer testNumWorkers;
  private Boolean trainShuffle;
  private Boolean trainPersistent;
  private Boolean valPersistent;

  // ========================
  // Model Architecture
  // ========================
  private Double dropPathRate;
  private Integer frozenStages;
  private String neckPolicy;
  private String classWeight;
  private String decoderChannels;

  // ========================
  // Loss & Optimization
  // ========================
  private Double weightDecay;
  private Double layerDecayRate;
  private Integer ignoreIndex;
  private Boolean ddpFindUnusedParams;
  private Integer numLayers;

  // ========================
  // Evaluation
  // ========================
  private String metrics;
  private String saveBest;
  private String saveBestRule;
  private Integer valInterval;
  private Integer logInterval;
  private Integer visInterval;

  // ========================
  // Augmentation
  // ========================
  private Double rotProb;
  private String rotDegree;
  private Double flipProb;
  private Double exchangeProb;
  private Integer brightnessDelta;
  private String contrastRange;
  private String saturationRange;
  private Integer hueDelta;

  // ========================
  // 실행 타임아웃
  // ========================
  private Integer timeoutSeconds;
  private String resumeFrom;

  private UUID uuid;

  public String getOutputFolder() {
    return String.valueOf(this.outputFolder);
  }

  public String getUuid() {
    return String.valueOf(this.uuid);
  }
}
