diff --git a/optuna_dashboard/ts/components/GraphHistory.tsx b/optuna_dashboard/ts/components/GraphHistory.tsx index 73cf2f09..3093d82b 100644 --- a/optuna_dashboard/ts/components/GraphHistory.tsx +++ b/optuna_dashboard/ts/components/GraphHistory.tsx @@ -1,6 +1,7 @@ import * as plotly from "plotly.js-dist-min" import React, { ChangeEvent, FC, useEffect, useState } from "react" import { + Box, Grid, FormControl, FormLabel, @@ -163,7 +164,12 @@ export const GraphHistory: FC<{ -
+ ) diff --git a/optuna_dashboard/ts/components/StudyHistory.tsx b/optuna_dashboard/ts/components/StudyHistory.tsx index dc5f1289..ce30fc44 100644 --- a/optuna_dashboard/ts/components/StudyHistory.tsx +++ b/optuna_dashboard/ts/components/StudyHistory.tsx @@ -89,21 +89,19 @@ export const StudyHistory: FC<{ studyId: number }> = ({ studyId }) => { ) : null} - {studyDetail !== null ? ( - - - - - - ) : null} + + + + + {studyDetail !== null && studyDetail.directions.length == 1 && diff --git a/optuna_dashboard/ts/trialFilter.ts b/optuna_dashboard/ts/trialFilter.ts index 142ec37f..81e82fda 100644 --- a/optuna_dashboard/ts/trialFilter.ts +++ b/optuna_dashboard/ts/trialFilter.ts @@ -201,6 +201,9 @@ export const useObjectiveAndUserAttrTargetsFromStudies = ( defaultTarget.identifier() ) const minDirections = useMemo(() => { + if (studies.length === 0) { + return 0 + } return studies.reduce((acc, study) => { return Math.min(acc, study.directions.length) }, Number.MAX_VALUE)