mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-09-24 13:41:07 +08:00
Add dependency for updating parameter importance
This commit is contained in:
@@ -26,15 +26,15 @@ const distributionColors = {
|
||||
}
|
||||
|
||||
export const HyperparameterImportances: FC<{
|
||||
studyId: number
|
||||
}> = ({ studyId }) => {
|
||||
studyId: number, numOfTrials: number
|
||||
}> = ({ studyId, numOfTrials = 0 }) => {
|
||||
useEffect(() => {
|
||||
async function fetchAndPlotParamImportances(studyId: number) {
|
||||
const paramsImportanceData = await getParamImportances(studyId)
|
||||
plotParamImportances(paramsImportanceData)
|
||||
}
|
||||
fetchAndPlotParamImportances(studyId)
|
||||
})
|
||||
}, [numOfTrials])
|
||||
return <div id={plotDomId} />
|
||||
}
|
||||
|
||||
|
||||
@@ -202,7 +202,7 @@ export const StudyDetail: FC = () => {
|
||||
<Grid item xs={6}>
|
||||
<Card className={classes.card}>
|
||||
<CardContent>
|
||||
<HyperparameterImportances studyId={studyIdNumber} />
|
||||
<HyperparameterImportances studyId={studyIdNumber} numOfTrials={trials.length}/>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</Grid>
|
||||
|
||||
Reference in New Issue
Block a user