diff --git a/backend/src/main/java/com/worlabel/domain/result/entity/Optimizer.java b/backend/src/main/java/com/worlabel/domain/result/entity/Optimizer.java index f31fd92..8546b02 100644 --- a/backend/src/main/java/com/worlabel/domain/result/entity/Optimizer.java +++ b/backend/src/main/java/com/worlabel/domain/result/entity/Optimizer.java @@ -5,13 +5,13 @@ import com.fasterxml.jackson.annotation.JsonValue; public enum Optimizer { - AUTO("AUTO"), + AUTO("auto"), SGD("SGD"), - ADAM("ADAM"), - ADAMW("ADAMW"), - NADAM("NADAM"), - RADAM("RADAM"), - RMSPROP("RMSPROP"); + ADAM("Adam"), + ADAMW("AdamW"), + NADAM("NAdam"), + RADAM("RAdam"), + RMSPROP("RMSProp"); private final String value; @@ -22,11 +22,11 @@ public enum Optimizer { @JsonCreator public static Optimizer from(String value) { for (Optimizer status : Optimizer.values()) { - if (status.getValue().equals(value.toUpperCase())) { + if (status.getValue().equalsIgnoreCase(value)) { return status; } } - return null; + throw new IllegalArgumentException("Unknown optimizer: " + value); } @JsonValue