-
-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use tslib's PlotIntermediateValue in optuna-dashboard #900
Use tslib's PlotIntermediateValue in optuna-dashboard #900
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR👍
I left a few suggestions.
const isFeasible = trial.constraints.every((c) => c <= 0) | ||
return { | ||
x: trial.intermediate_values.map((iv) => iv.step), | ||
y: trial.intermediate_values.map((iv) => iv.value), | ||
marker: { maxdisplayed: 10 }, | ||
mode: "lines+markers", | ||
type: "scatter", | ||
name: `trial #${trial.number} ${ | ||
trial.state === "Running" | ||
? "(running)" | ||
: !isFeasible | ||
? "(infeasible)" | ||
: "" | ||
}`, | ||
...(!isFeasible && { line: { color: "#CCCCCC" } }), | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The branch by isFeasible
is missing on the tslib
side, could you add it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
legend: { | ||
x: 1.0, | ||
y: 0.95, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add this property on tslib
side?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
const values = trial.intermediate_values.filter( | ||
(iv) => | ||
iv.value !== Infinity && | ||
iv.value !== -Infinity && | ||
!Number.isNaN(iv.value) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed those lines because they do not exist in optuna-dashbaord. But, if you feel we should revert them, tell me that, please.
@porink0424 I followed your review comments. Could you review it again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Contributor License Agreement
This repository (
optuna-dashboard
) and Goptuna share common code.This pull request may therefore be ported to Goptuna.
Make sure that you understand the consequences concerning licenses and check the box below if you accept the term before creating this pull request.
Reference Issues/PRs
NA
What does this implement/fix? Explain your changes.
Use tslib's PlotIntermediateValue in optuna-dashboard