From ddd6492c8dbc3d2b22c8239fc513892d034fe362 Mon Sep 17 00:00:00 2001 From: c-bata Date: Wed, 10 May 2023 11:57:42 +0900 Subject: [PATCH] Remove stable ui components --- optuna_dashboard/ts/components/App.tsx | 24 +- optuna_dashboard/ts/components/AppDrawer.tsx | 20 +- .../ts/components/CompareStudies.tsx | 6 +- optuna_dashboard/ts/components/GraphEdf.tsx | 6 +- .../ts/components/GraphHistory.tsx | 141 +-------- .../ts/components/GraphParallelCoordinate.tsx | 2 +- optuna_dashboard/ts/components/GraphSlice.tsx | 1 - .../ts/components/PreferenceDialog.tsx | 172 ----------- .../ts/components/ReloadIntervalSelect.tsx | 86 ------ .../ts/components/StudyDetail.tsx | 249 ---------------- .../ts/components/StudyDetailBeta.tsx | 2 +- .../ts/components/StudyHistory.tsx | 4 +- optuna_dashboard/ts/components/StudyList.tsx | 277 ------------------ .../ts/components/StudyListBeta.tsx | 17 +- optuna_dashboard/ts/trialFilter.ts | 16 +- 15 files changed, 35 insertions(+), 988 deletions(-) delete mode 100644 optuna_dashboard/ts/components/PreferenceDialog.tsx delete mode 100644 optuna_dashboard/ts/components/ReloadIntervalSelect.tsx delete mode 100644 optuna_dashboard/ts/components/StudyDetail.tsx delete mode 100644 optuna_dashboard/ts/components/StudyList.tsx diff --git a/optuna_dashboard/ts/components/App.tsx b/optuna_dashboard/ts/components/App.tsx index 828108ef..41aa8c1e 100644 --- a/optuna_dashboard/ts/components/App.tsx +++ b/optuna_dashboard/ts/components/App.tsx @@ -13,8 +13,6 @@ import { } from "@mui/material" import { CompareStudies } from "./CompareStudies" -import { StudyDetail } from "./StudyDetail" -import { StudyList } from "./StudyList" import { StudyDetailBeta } from "./StudyDetailBeta" import { StudyListBeta } from "./StudyListBeta" @@ -53,15 +51,6 @@ export const App: FC = () => { - - } - /> { /> } + children={ + + } /> { } /> - } - /> } + children={} /> diff --git a/optuna_dashboard/ts/components/AppDrawer.tsx b/optuna_dashboard/ts/components/AppDrawer.tsx index 15d63c42..540aa7cc 100644 --- a/optuna_dashboard/ts/components/AppDrawer.tsx +++ b/optuna_dashboard/ts/components/AppDrawer.tsx @@ -24,7 +24,6 @@ import Brightness4Icon from "@mui/icons-material/Brightness4" import Brightness7Icon from "@mui/icons-material/Brightness7" import TableViewIcon from "@mui/icons-material/TableView" import RateReviewIcon from "@mui/icons-material/RateReview" -import ClearIcon from "@mui/icons-material/Clear" import MenuIcon from "@mui/icons-material/Menu" import GitHubIcon from "@mui/icons-material/GitHub" import OpenInNewIcon from "@mui/icons-material/OpenInNew" @@ -185,7 +184,7 @@ export const AppDrawer: FC<{ @@ -304,7 +303,7 @@ export const AppDrawer: FC<{ @@ -314,21 +313,6 @@ export const AppDrawer: FC<{ - - - - - - - - diff --git a/optuna_dashboard/ts/components/CompareStudies.tsx b/optuna_dashboard/ts/components/CompareStudies.tsx index 5e4d5f00..2005c4a2 100644 --- a/optuna_dashboard/ts/components/CompareStudies.tsx +++ b/optuna_dashboard/ts/components/CompareStudies.tsx @@ -99,7 +99,7 @@ export const CompareStudies: FC<{ <> = ({ studies }) => { diff --git a/optuna_dashboard/ts/components/GraphEdf.tsx b/optuna_dashboard/ts/components/GraphEdf.tsx index ee1418fd..9c71be36 100644 --- a/optuna_dashboard/ts/components/GraphEdf.tsx +++ b/optuna_dashboard/ts/components/GraphEdf.tsx @@ -37,7 +37,7 @@ export const GraphEdfBeta: FC<{ () => new Target("objective", objectiveId), [objectiveId] ) - const trials = useFilteredTrials(study, [target], false, false) + const trials = useFilteredTrials(study, [target], false) useEffect(() => { if (study !== null) { @@ -62,7 +62,7 @@ export const GraphEdf: FC<{ }> = ({ study = null }) => { const theme = useTheme() const [targets, selected, setTarget] = useObjectiveTargets(study) - const trials = useFilteredTrials(study, [selected], false, false) + const trials = useFilteredTrials(study, [selected], false) const handleObjectiveChange = (event: SelectChangeEvent) => { setTarget(event.target.value) @@ -119,7 +119,7 @@ export const GraphEdfMultiStudies: FC<{ studies.length !== 0 ? studies[0] : null ) - const trials = useFilteredTrialsFromStudies(studies, [selected], false, false) + const trials = useFilteredTrialsFromStudies(studies, [selected], false) const edfPlotInfos = studies.map((study, index) => { const e: EdfPlotInfo = { study_name: study?.name, diff --git a/optuna_dashboard/ts/components/GraphHistory.tsx b/optuna_dashboard/ts/components/GraphHistory.tsx index ae219850..2e78cd89 100644 --- a/optuna_dashboard/ts/components/GraphHistory.tsx +++ b/optuna_dashboard/ts/components/GraphHistory.tsx @@ -5,9 +5,7 @@ import { FormControl, FormLabel, FormControlLabel, - Checkbox, MenuItem, - Switch, Select, Radio, RadioGroup, @@ -34,24 +32,16 @@ interface HistoryPlotInfo { export const GraphHistory: FC<{ study: StudyDetail | null - betaLogScale?: boolean - betaIncludePruned?: boolean -}> = ({ study, betaLogScale, betaIncludePruned }) => { + logScale: boolean + includePruned: boolean +}> = ({ study, logScale, includePruned }) => { const theme = useTheme() const [xAxis, setXAxis] = useState< "number" | "datetime_start" | "datetime_complete" >("number") - const [logScale, setLogScale] = useState(false) - const [filterCompleteTrial, setFilterCompleteTrial] = useState(false) - const [filterPrunedTrial, setFilterPrunedTrial] = useState(false) const [targets, selected, setTarget] = useObjectiveAndUserAttrTargets(study) - const trials = useFilteredTrials( - study, - [selected], - filterCompleteTrial, - betaIncludePruned === undefined ? filterPrunedTrial : !betaIncludePruned - ) + const trials = useFilteredTrials(study, [selected], includePruned) useEffect(() => { if (study !== null) { @@ -60,7 +50,7 @@ export const GraphHistory: FC<{ study.directions, selected, xAxis, - betaLogScale === undefined ? logScale : betaLogScale, + logScale, theme.palette.mode, study?.objective_names ) @@ -70,7 +60,6 @@ export const GraphHistory: FC<{ study?.directions, selected, logScale, - betaLogScale, xAxis, theme.palette.mode, study?.objective_names, @@ -90,18 +79,6 @@ export const GraphHistory: FC<{ } } - const handleLogScaleChange = (e: ChangeEvent) => { - setLogScale(!logScale) - } - - const handleFilterCompleteChange = (e: ChangeEvent) => { - setFilterCompleteTrial(!filterCompleteTrial) - } - - const handleFilterPrunedChange = (e: ChangeEvent) => { - setFilterPrunedTrial(!filterPrunedTrial) - } - return ( ) : null} - {betaLogScale === undefined ? ( - - Log y scale: - - - ) : null} - {betaIncludePruned === undefined ? ( - - Filter state: - - } - label="Complete" - /> - - } - label="Pruned" - /> - - ) : null} = ({ studies, betaLogScale, betaIncludePruned }) => { + logScale: boolean + includePruned: boolean +}> = ({ studies, logScale, includePruned }) => { const theme = useTheme() const [xAxis, setXAxis] = useState< "number" | "datetime_start" | "datetime_complete" >("number") - const [logScale, setLogScale] = useState(false) - const [filterCompleteTrial, setFilterCompleteTrial] = useState(false) - const [filterPrunedTrial, setFilterPrunedTrial] = useState(false) // TODO(umezawa): Prepare targets with all studies. const [targets, selected, setTarget] = useObjectiveAndUserAttrTargets( @@ -232,8 +166,7 @@ export const GraphHistoryMultiStudies: FC<{ const trials = useFilteredTrialsFromStudies( studies, [selected], - filterCompleteTrial, - betaIncludePruned === undefined ? filterPrunedTrial : !betaIncludePruned + !includePruned ) const historyPlotInfos = studies.map((study, index) => { const h: HistoryPlotInfo = { @@ -250,10 +183,10 @@ export const GraphHistoryMultiStudies: FC<{ historyPlotInfos, selected, xAxis, - betaLogScale === undefined ? logScale : betaLogScale, + logScale, theme.palette.mode ) - }, [studies, selected, logScale, betaLogScale, xAxis, theme.palette.mode]) + }, [studies, selected, logScale, xAxis, theme.palette.mode]) const handleObjectiveChange = (event: SelectChangeEvent) => { setTarget(event.target.value) @@ -269,18 +202,6 @@ export const GraphHistoryMultiStudies: FC<{ } } - const handleLogScaleChange = (e: ChangeEvent) => { - setLogScale(!logScale) - } - - const handleFilterCompleteChange = (e: ChangeEvent) => { - setFilterCompleteTrial(!filterCompleteTrial) - } - - const handleFilterPrunedChange = (e: ChangeEvent) => { - setFilterPrunedTrial(!filterPrunedTrial) - } - return ( ) : null} - {betaLogScale === undefined ? ( - - Log y scale: - - - ) : null} - {betaIncludePruned === undefined ? ( - - Filter state: - - } - label="Complete" - /> - - } - label="Pruned" - /> - - ) : null} { if (study !== null) { plotCoordinate(study, trials, targets, searchSpace, theme.palette.mode) diff --git a/optuna_dashboard/ts/components/GraphSlice.tsx b/optuna_dashboard/ts/components/GraphSlice.tsx index cfa86ba6..8ce335af 100644 --- a/optuna_dashboard/ts/components/GraphSlice.tsx +++ b/optuna_dashboard/ts/components/GraphSlice.tsx @@ -47,7 +47,6 @@ export const GraphSlice: FC<{ selectedParamTarget !== null ? [selectedObjective, selectedParamTarget] : [selectedObjective], - false, false ) diff --git a/optuna_dashboard/ts/components/PreferenceDialog.tsx b/optuna_dashboard/ts/components/PreferenceDialog.tsx deleted file mode 100644 index 79261f7f..00000000 --- a/optuna_dashboard/ts/components/PreferenceDialog.tsx +++ /dev/null @@ -1,172 +0,0 @@ -import React, { useEffect, useState } from "react" -import MuiDialogTitle from "@mui/material/DialogTitle" -import CloseIcon from "@mui/icons-material/Close" -import MuiDialogContent from "@mui/material/DialogContent" -import FormControlLabel from "@mui/material/FormControlLabel" -import { - Dialog, - Checkbox, - Typography, - IconButton, - FormGroup, - useTheme, - FormLabel, -} from "@mui/material" -import { useRecoilValue } from "recoil" -import { graphVisibilityState } from "../state" -import { actionCreator } from "../action" - -type UsePreferenceDialogReturn = [(open: boolean) => void, () => JSX.Element] - -export const usePreferenceDialog = ( - studyDetail: StudyDetail | null -): UsePreferenceDialogReturn => { - const theme = useTheme() - const action = actionCreator() - const globalGraphVisibility = - useRecoilValue(graphVisibilityState) - const [localGraphVisibility, setLocalGraphVisibility] = - useState(globalGraphVisibility) - - useEffect(() => { - action.getGraphVisibility() - }, []) - - useEffect(() => { - setLocalGraphVisibility(globalGraphVisibility) - }, [globalGraphVisibility]) - - const [prefOpen, setPrefOpen] = useState(false) - const handleClose = () => { - setPrefOpen(false) - action.saveGraphVisibility(localGraphVisibility) - } - const handlePreferenceOnChange = ( - event: React.ChangeEvent - ) => { - setLocalGraphVisibility({ - ...localGraphVisibility, - [event.target.name]: event.target.checked, - }) - } - - const renderPreferenceDialog = () => { - return ( - - - Preferences - - - - - - Charts - - - } - label="History" - /> - - } - label="Pareto Front" - /> - - } - label="Parallel Coordinate" - /> - 1 || - !studyDetail.has_intermediate_values) - } - control={ - - } - label="Intermediate Values" - /> - - } - label="EDF" - /> - - } - label="Contour" - /> - - } - label="Hyperparameter Importances" - /> - - } - label="Slice" - /> - - - - ) - } - return [setPrefOpen, renderPreferenceDialog] -} diff --git a/optuna_dashboard/ts/components/ReloadIntervalSelect.tsx b/optuna_dashboard/ts/components/ReloadIntervalSelect.tsx deleted file mode 100644 index 1c323f6f..00000000 --- a/optuna_dashboard/ts/components/ReloadIntervalSelect.tsx +++ /dev/null @@ -1,86 +0,0 @@ -import React, { FC } from "react" -import { styled } from "@mui/system" -import { useRecoilValue } from "recoil" -import { reloadIntervalState } from "../state" -import { MenuItem, TextField, alpha } from "@mui/material" -import { Cached } from "@mui/icons-material" -import { actionCreator } from "../action" - -export const ReloadIntervalSelect: FC = () => { - const action = actionCreator() - const reloadInterval = useRecoilValue(reloadIntervalState) - - const Wrapper = styled("div")(({ theme }) => ({ - position: "relative", - borderRadius: theme.shape.borderRadius, - backgroundColor: alpha(theme.palette.common.white, 0.15), - "&:hover": { - backgroundColor: alpha(theme.palette.common.white, 0.25), - }, - marginLeft: 0, - width: "100%", - [theme.breakpoints.up("sm")]: { - marginLeft: theme.spacing(1), - width: "auto", - }, - })) - - const IconWrapper = styled("div")(({ theme }) => ({ - padding: theme.spacing(0, 2), - height: "100%", - position: "absolute", - pointerEvents: "none", - display: "flex", - alignItems: "center", - justifyContent: "center", - })) - - const Select = styled(TextField)(({ theme }) => ({ - color: "inherit", - width: "14ch", - "& .MuiInput-underline:after": { - borderColor: "rgb(256,256,256,.1)", - }, - "& .MuiOutlinedInput-root": { - color: "inherit", - "& fieldset": { - borderColor: "rgb(256,256,256,.1)", - }, - "& .MuiSelect-icon": { - color: "white", - }, - "&:hover fieldset": { - borderColor: "rgb(256,256,256,.1)", - }, - "&.Mui-focused fieldset": { - borderColor: "rgb(256,256,256,.1)", - }, - }, - "& .MuiInputBase-input": { - // vertical padding + font size from searchIcon - paddingLeft: `calc(1em + ${theme.spacing(4)})`, - width: "100%", - }, - })) - - return ( - - - - - - - ) -} diff --git a/optuna_dashboard/ts/components/StudyDetail.tsx b/optuna_dashboard/ts/components/StudyDetail.tsx deleted file mode 100644 index 530125fb..00000000 --- a/optuna_dashboard/ts/components/StudyDetail.tsx +++ /dev/null @@ -1,249 +0,0 @@ -import React, { FC, useEffect } from "react" -import { useRecoilValue } from "recoil" -import { Link, useParams } from "react-router-dom" -import { - AppBar, - Card, - Typography, - CardContent, - Container, - Toolbar, - Box, - IconButton, - useTheme, -} from "@mui/material" -import { Home, Settings } from "@mui/icons-material" -import Brightness4Icon from "@mui/icons-material/Brightness4" -import Brightness7Icon from "@mui/icons-material/Brightness7" - -import { GraphParallelCoordinate } from "./GraphParallelCoordinate" -import { GraphHyperparameterImportances } from "./GraphHyperparameterImportances" -import { GraphEdf } from "./GraphEdf" -import { Contour } from "./GraphContour" -import { GraphIntermediateValues } from "./GraphIntermediateValues" -import { GraphSlice } from "./GraphSlice" -import { GraphHistory } from "./GraphHistory" -import { GraphParetoFront } from "./GraphParetoFront" -import { StudyNote } from "./Note" -import { actionCreator } from "../action" -import { - graphVisibilityState, - reloadIntervalState, - studyDetailsState, - studySummariesState, -} from "../state" -import { usePreferenceDialog } from "./PreferenceDialog" -import { ReloadIntervalSelect } from "./ReloadIntervalSelect" -import { TrialTable } from "./TrialTable" - -interface ParamTypes { - studyId: string -} - -const useStudyDetailValue = (studyId: number): StudyDetail | null => { - const studyDetails = useRecoilValue(studyDetailsState) - return studyDetails[studyId] || null -} - -const useStudySummaryValue = (studyId: number): StudySummary | null => { - const studySummaries = useRecoilValue(studySummariesState) - return studySummaries.find((s) => s.study_id == studyId) || null -} - -export const StudyDetail: FC<{ - toggleColorMode: () => void -}> = ({ toggleColorMode }) => { - const theme = useTheme() - const action = actionCreator() - const { studyId } = useParams() - const studyIdNumber = parseInt(studyId, 10) - const studyDetail = useStudyDetailValue(studyIdNumber) - const studySummary = useStudySummaryValue(studyIdNumber) - const directions = studyDetail?.directions || studySummary?.directions || null - const graphVisibility = useRecoilValue(graphVisibilityState) - const reloadInterval = useRecoilValue(reloadIntervalState) - const [openPreferenceDialog, renderPreferenceDialog] = - usePreferenceDialog(studyDetail) - - useEffect(() => { - action.loadReloadInterval() - action.updateStudyDetail(studyIdNumber) - }, []) - - useEffect(() => { - if (reloadInterval < 0) { - return - } - const intervalId = setInterval(function () { - action.updateStudyDetail(studyIdNumber) - }, reloadInterval * 1000) - return () => clearInterval(intervalId) - }, [reloadInterval, studyDetail]) - - // TODO(chenghuzi): Reduce the number of calls to setInterval and clearInterval. - const title = studyDetail !== null ? studyDetail.name : `Study #${studyId}` - const trials: Trial[] = studyDetail !== null ? studyDetail.trials : [] - - return ( -
- {renderPreferenceDialog()} - - - - {APP_BAR_TITLE} - - - { - toggleColorMode() - }} - color="inherit" - title={ - theme.palette.mode === "dark" - ? "Switch to light mode" - : "Switch to dark mode" - } - > - {theme.palette.mode === "dark" ? ( - - ) : ( - - )} - - { - openPreferenceDialog(true) - }} - title="Open preference panel" - > - - - - - - - - - -
- - {title} - - {graphVisibility.history ? ( - - - - - - ) : null} - - {directions !== null && - directions.length > 1 && - graphVisibility.paretoFront ? ( - - - - - - ) : null} - {graphVisibility.parallelCoordinate ? ( - - - - - - ) : null} - - {studyDetail !== null && - studyDetail.directions.length == 1 && - studyDetail.has_intermediate_values && - graphVisibility.intermediateValues ? ( - - - - - - ) : null} - {graphVisibility.edf ? ( - - - - - - ) : null} - - {graphVisibility.contour ? ( - - - - - - ) : null} - - {graphVisibility.importances ? ( - - - - - - ) : null} - - {studyDetail !== null && graphVisibility.slice ? ( - - - - - - ) : null} - - - - {studyDetail !== null ? ( - - ) : null} -
-
-
- ) -} diff --git a/optuna_dashboard/ts/components/StudyDetailBeta.tsx b/optuna_dashboard/ts/components/StudyDetailBeta.tsx index 6a7ab839..4de16577 100644 --- a/optuna_dashboard/ts/components/StudyDetailBeta.tsx +++ b/optuna_dashboard/ts/components/StudyDetailBeta.tsx @@ -168,7 +168,7 @@ export const StudyDetailBeta: FC<{ <> = ({ studyId }) => { diff --git a/optuna_dashboard/ts/components/StudyList.tsx b/optuna_dashboard/ts/components/StudyList.tsx deleted file mode 100644 index 86e7158f..00000000 --- a/optuna_dashboard/ts/components/StudyList.tsx +++ /dev/null @@ -1,277 +0,0 @@ -import React, { FC, useEffect, useMemo } from "react" -import { useRecoilValue } from "recoil" -import { Link } from "react-router-dom" -import { - AppBar, - Toolbar, - Typography, - Container, - Card, - Grid, - Box, - IconButton, - useTheme, - InputAdornment, - SvgIcon, - CardContent, -} from "@mui/material" -import { AddBox, Delete, Refresh, Search } from "@mui/icons-material" - -import { actionCreator } from "../action" -import { DataGrid, DataGridColumn } from "./DataGrid" -import { DebouncedInputTextField } from "./Debounce" -import { studySummariesState } from "../state" -import Brightness7Icon from "@mui/icons-material/Brightness7" -import Brightness4Icon from "@mui/icons-material/Brightness4" -import { useDeleteStudyDialog } from "./DeleteStudyDialog" -import { useCreateStudyDialog } from "./CreateStudyDialog" - -export const StudyList: FC<{ - toggleColorMode: () => void -}> = ({ toggleColorMode }) => { - const theme = useTheme() - - const [studyFilterText, setStudyFilterText] = React.useState("") - const studyFilter = (row: StudySummary) => { - const keywords = studyFilterText.split(" ") - return !keywords.every((k) => { - if (k === "") { - return true - } - return row.study_name.indexOf(k) >= 0 - }) - } - const [openDeleteStudyDialog, renderDeleteStudyDialog] = - useDeleteStudyDialog() - const [openCreateStudyDialog, renderCreateStudyDialog] = - useCreateStudyDialog() - - const linkColor = useMemo( - () => - theme.palette.mode === "dark" - ? theme.palette.primary.light - : theme.palette.primary.dark, - [theme.palette.mode] - ) - - const action = actionCreator() - const studies = useRecoilValue(studySummariesState) - - useEffect(() => { - action.updateStudySummaries() - }, []) - - const columns: DataGridColumn[] = [ - { - field: "study_id", - label: "Study ID", - sortable: true, - }, - { - field: "study_name", - label: "Name", - sortable: true, - toCellValue: (i) => ( - - {studies[i].study_name} - - ), - }, - { - field: "directions", - label: "Direction", - sortable: false, - toCellValue: (i) => studies[i].directions.join(), - }, - { - field: "study_name", - label: "", - sortable: false, - padding: "none", - toCellValue: (i) => ( - { - openDeleteStudyDialog(studies[i].study_id) - }} - > - - - ), - }, - ] - - const collapseAttrColumns: DataGridColumn[] = [ - { field: "key", label: "Key", sortable: true }, - { field: "value", label: "Value", sortable: true }, - ] - - const collapseBody = (index: number) => { - return ( - - - - - Study user attributes - - - columns={collapseAttrColumns} - rows={studies[index].user_attrs} - keyField={"key"} - dense={true} - initialRowsPerPage={5} - rowsPerPageOption={[5, 10, { label: "All", value: -1 }]} - /> - - - - - - Study system attributes - - - columns={collapseAttrColumns} - rows={studies[index].system_attrs} - keyField={"key"} - dense={true} - initialRowsPerPage={5} - rowsPerPageOption={[5, 10, { label: "All", value: -1 }]} - /> - - - - ) - } - - return ( - <> - - - - {APP_BAR_TITLE} - - { - toggleColorMode() - }} - color="inherit" - title={ - theme.palette.mode === "dark" - ? "Switch to light mode" - : "Switch to dark mode" - } - > - {theme.palette.mode === "dark" ? ( - - ) : ( - - )} - - { - action.updateStudySummaries("Success to reload") - }} - color="inherit" - title="Reload studies" - > - - - { - openCreateStudyDialog() - }} - color="inherit" - title="Create new study" - > - - - - - - - - - - Announcement - - - {`Please go to `} - - our experimental new UI page - - {" and share your thoughts with us via "} - - the GitHub Discussion's post - - {"."} - - - - - - - { - setStudyFilterText(s) - }} - delay={500} - textFieldProps={{ - fullWidth: true, - id: "search-study", - variant: "outlined", - placeholder: "Search study", - InputProps: { - startAdornment: ( - - - - - - ), - }, - }} - /> - - - - - - columns={columns} - rows={studies} - keyField={"study_id"} - collapseBody={collapseBody} - initialRowsPerPage={10} - rowsPerPageOption={[5, 10, { label: "All", value: -1 }]} - defaultFilter={studyFilter} - /> - - - {renderCreateStudyDialog()} - {renderDeleteStudyDialog()} - - ) -} diff --git a/optuna_dashboard/ts/components/StudyListBeta.tsx b/optuna_dashboard/ts/components/StudyListBeta.tsx index 9ed503d4..f010f048 100644 --- a/optuna_dashboard/ts/components/StudyListBeta.tsx +++ b/optuna_dashboard/ts/components/StudyListBeta.tsx @@ -17,7 +17,6 @@ import { TextField, CardActions, } from "@mui/material" -import MuiLink from "@mui/material/Link" import { Delete, Refresh, Search } from "@mui/icons-material" import SortIcon from "@mui/icons-material/Sort" import HomeIcon from "@mui/icons-material/Home" @@ -120,20 +119,6 @@ export const StudyListBeta: FC<{ }, }} > - - - - {`Thank you for testing the new UI! We would appreciate it if you could send us the feedback via `} - - this post - - {" on GitHub Discussions."} - - - @@ -201,7 +186,7 @@ export const StudyListBeta: FC<{ > diff --git a/optuna_dashboard/ts/trialFilter.ts b/optuna_dashboard/ts/trialFilter.ts index 2cb95793..96fb308f 100644 --- a/optuna_dashboard/ts/trialFilter.ts +++ b/optuna_dashboard/ts/trialFilter.ts @@ -95,7 +95,6 @@ export class Target { const filterTrials = ( study: StudyDetail | null, targets: Target[], - filterComplete: boolean, filterPruned: boolean ): Trial[] => { if (study === null) { @@ -105,9 +104,6 @@ const filterTrials = ( if (t.state !== "Complete" && t.state !== "Pruned") { return false } - if (t.state === "Complete" && filterComplete) { - return false - } if (t.state === "Pruned" && filterPruned) { return false } @@ -118,24 +114,20 @@ const filterTrials = ( export const useFilteredTrials = ( study: StudyDetail | null, targets: Target[], - filterComplete: boolean, filterPruned: boolean ): Trial[] => useMemo(() => { - return filterTrials(study, targets, filterComplete, filterPruned) - }, [study?.trials, targets, filterComplete, filterPruned]) + return filterTrials(study, targets, filterPruned) + }, [study?.trials, targets, filterPruned]) export const useFilteredTrialsFromStudies = ( studies: StudyDetail[], targets: Target[], - filterComplete: boolean, filterPruned: boolean ): Trial[][] => useMemo(() => { - return studies.map((s) => - filterTrials(s, targets, filterComplete, filterPruned) - ) - }, [studies, targets, filterComplete, filterPruned]) + return studies.map((s) => filterTrials(s, targets, filterPruned)) + }, [studies, targets, filterPruned]) export const useObjectiveTargets = ( study: StudyDetail | null