mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-09-10 12:23:22 +08:00
Improve best_trial card
This commit is contained in:
@@ -24,7 +24,8 @@ const getPlotDomId = (objectiveId: number) => `graph-importance-${objectiveId}`
|
||||
export const GraphHyperparameterImportanceBeta: FC<{
|
||||
studyId: number
|
||||
study: StudyDetail | null
|
||||
}> = ({ studyId, study = null }) => {
|
||||
graphHeight: string
|
||||
}> = ({ studyId, study = null, graphHeight }) => {
|
||||
const theme = useTheme()
|
||||
const action = actionCreator()
|
||||
const importances = useParamImportanceValue(studyId)
|
||||
@@ -51,7 +52,7 @@ export const GraphHyperparameterImportanceBeta: FC<{
|
||||
}
|
||||
return (
|
||||
<Grid2 key={i} xs={6}>
|
||||
<Card sx={{ margin: theme.spacing(2) }}>
|
||||
<Card>
|
||||
<CardContent>
|
||||
<Typography
|
||||
variant="h6"
|
||||
@@ -59,7 +60,7 @@ export const GraphHyperparameterImportanceBeta: FC<{
|
||||
>
|
||||
{title}
|
||||
</Typography>
|
||||
<Box id={getPlotDomId(i)} sx={{ height: "450px" }} />
|
||||
<Box id={getPlotDomId(i)} sx={{ height: graphHeight }} />
|
||||
</CardContent>
|
||||
</Card>
|
||||
</Grid2>
|
||||
|
||||
@@ -105,13 +105,14 @@ export const StudyDetailBeta: FC<{
|
||||
</CardContent>
|
||||
</Card>
|
||||
) : null}
|
||||
<Grid2 container spacing={2}>
|
||||
<Grid2 container spacing={2} sx={{ padding: theme.spacing(0, 2) }}>
|
||||
<GraphHyperparameterImportanceBeta
|
||||
studyId={studyIdNumber}
|
||||
study={studyDetail}
|
||||
graphHeight="450px"
|
||||
/>
|
||||
<Grid2 xs={6}>
|
||||
<Card sx={{ margin: theme.spacing(2) }}>
|
||||
<Grid2 xs={6} spacing={2}>
|
||||
<Card>
|
||||
<CardContent
|
||||
sx={{
|
||||
alignItems: "center",
|
||||
@@ -135,6 +136,12 @@ export const StudyDetailBeta: FC<{
|
||||
>
|
||||
{studyDetail.best_trials[0].values}
|
||||
</Typography>
|
||||
<Typography>
|
||||
number={studyDetail.best_trials[0].number}
|
||||
</Typography>
|
||||
<Typography>
|
||||
trial_id={studyDetail.best_trials[0].trial_id}
|
||||
</Typography>
|
||||
<Typography>
|
||||
Params = [
|
||||
{studyDetail.best_trials[0].params
|
||||
@@ -142,6 +149,20 @@ export const StudyDetailBeta: FC<{
|
||||
.join(", ")}
|
||||
]
|
||||
</Typography>
|
||||
<Typography>
|
||||
Intermediate Values = [
|
||||
{studyDetail.best_trials[0].intermediate_values
|
||||
.map((p) => `${p.step}: ${p.value}`)
|
||||
.join(", ")}
|
||||
]
|
||||
</Typography>
|
||||
<Typography>
|
||||
User Attributes = [
|
||||
{studyDetail.best_trials[0].user_attrs
|
||||
.map((p) => `${p.key}: ${p.value}`)
|
||||
.join(", ")}
|
||||
]
|
||||
</Typography>
|
||||
</>
|
||||
)}
|
||||
{studyDetail !== null && studyDetail.directions.length > 1 && (
|
||||
@@ -184,7 +205,7 @@ export const StudyDetailBeta: FC<{
|
||||
</Card>
|
||||
</Grid2>
|
||||
<Grid2 xs={6}>
|
||||
<Card sx={{ margin: theme.spacing(2) }}>
|
||||
<Card>
|
||||
<CardContent
|
||||
sx={{
|
||||
alignItems: "center",
|
||||
|
||||
Reference in New Issue
Block a user