mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-09-25 13:50:21 +08:00
Fix comparator function for TrialIntermediateValue table
This commit is contained in:
@@ -667,17 +667,14 @@ export const TrialTable: FC<{ studyDetail: StudyDetail | null }> = ({
|
||||
if (firstVal === secondVal) {
|
||||
return 0
|
||||
}
|
||||
if (
|
||||
firstVal === "-inf" ||
|
||||
secondVal === "nan" ||
|
||||
secondVal === "inf"
|
||||
) {
|
||||
if (firstVal === "nan") {
|
||||
return -1
|
||||
} else if (secondVal === "nan") {
|
||||
return 1
|
||||
} else if (
|
||||
secondVal === "-inf" ||
|
||||
firstVal === "nan" ||
|
||||
firstVal === "inf"
|
||||
) {
|
||||
}
|
||||
if (firstVal === "-inf" || secondVal === "inf") {
|
||||
return 1
|
||||
} else if (secondVal === "-inf" || firstVal === "inf") {
|
||||
return -1
|
||||
}
|
||||
return firstVal < secondVal ? 1 : -1
|
||||
|
||||
Reference in New Issue
Block a user