Skip to content

Commit

Permalink
Make it close to the original
Browse files Browse the repository at this point in the history
  • Loading branch information
nabenabe0928 committed Nov 2, 2023
1 parent 79b50cc commit 71fa843
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions optuna_dashboard/ts/components/GraphIntermediateValues.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,19 @@ const plotIntermediateValue = (
(iv) => iv.value !== "inf" && iv.value !== "-inf" && iv.value !== "nan"
)
const isFeasible = trial.constraints.every((c) => c <= 0)
const name = `trial #${trial.number} ${
trial.state === "Running"
? "(running)"
: !isFeasible
? " (infeasible)"
: ""
}`
return {
x: values.map((iv) => iv.step),
y: values.map((iv) => iv.value),
marker: { maxdisplayed: 10 },
mode: "lines+markers",
type: "scatter",
name,
name: `trial #${trial.number} ${
trial.state === "Running"
? "(running)"
: !isFeasible
? " (infeasible)"
: ""
}`,
...(!isFeasible && { line: { color: "#CCCCCC", dash: "dash" } }),
}
})
Expand Down

0 comments on commit 71fa843

Please sign in to comment.