mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-09-23 13:30:25 +08:00
fixed by merge
This commit is contained in:
@@ -142,7 +142,7 @@ const ChoiceTrials: FC<{
|
||||
trials: Trial[]
|
||||
study_id: number
|
||||
}> = ({ choice, trials, study_id }) => {
|
||||
const [isRemoved, setRemoved] = useState(choice.isRemoved)
|
||||
const [isRemoved, setRemoved] = useState(choice.is_removed)
|
||||
const theme = useTheme()
|
||||
const worst_trials = new Set([choice.clicked])
|
||||
const action = actionCreator()
|
||||
@@ -170,7 +170,7 @@ const ChoiceTrials: FC<{
|
||||
>
|
||||
{formatDate(choice.timestamp)}
|
||||
</Typography>
|
||||
{choice.isRemoved ? (
|
||||
{choice.is_removed ? (
|
||||
<IconButton
|
||||
disabled={!isRemoved}
|
||||
onClick={() => {
|
||||
@@ -203,7 +203,7 @@ const ChoiceTrials: FC<{
|
||||
display: "flex",
|
||||
flexDirection: "row",
|
||||
flexWrap: "wrap",
|
||||
filter: choice.isRemoved ? "brightness(0.4)" : undefined,
|
||||
filter: choice.is_removed ? "brightness(0.4)" : undefined,
|
||||
backgroundColor: theme.palette.background.paper,
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -196,7 +196,8 @@ export const PreferentialTrials: FC<{ studyDetail: StudyDetail | null }> = ({
|
||||
|
||||
const hiddenTrials = new Set(
|
||||
studyDetail.preference_history
|
||||
?.map((p) => p.clicked)
|
||||
?.filter((h) => !h.is_removed)
|
||||
.map((p) => p.clicked)
|
||||
.concat(studyDetail.skipped_trials) ?? []
|
||||
)
|
||||
const activeTrials = studyDetail.trials.filter(
|
||||
@@ -256,7 +257,7 @@ export const PreferentialTrials: FC<{ studyDetail: StudyDetail | null }> = ({
|
||||
})
|
||||
}
|
||||
const latestHistoryId =
|
||||
studyDetail?.preference_history?.filter((h) => !h.isRemoved).pop()?.id ??
|
||||
studyDetail?.preference_history?.filter((h) => !h.is_removed).pop()?.id ??
|
||||
null
|
||||
if (undoHistoryId !== null && undoHistoryId !== latestHistoryId) {
|
||||
setUndoHistoryId(null)
|
||||
|
||||
Reference in New Issue
Block a user