Skip to content
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

Improve human feedback UI for Preferential Optimization #572

Merged
merged 7 commits into from
Aug 28, 2023

Conversation

moririn2528
Copy link
Contributor

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.

  • I agree this patch may be ported to Goptuna by other Goptuna contributors.

Reference Issues/PRs

What does this implement/fix? Explain your changes.

Copy link
Member

@c-bata c-bata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your pull request. I left some comments.

optuna_dashboard/ts/components/TrialList.tsx Show resolved Hide resolved
fontWeight: theme.typography.fontWeightBold,
}}
>
Which trial is worst?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Which trial is worst?
Which trial is the worst?

}}
/>
))}
<Box>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should put some paddings inside the content.

Screenshot 2023-08-25 17 12 17

Comment on lines 180 to 183
const shuffleFlag = shuffleTrial + 20 < displayTrials.last_number
if (shuffleFlag) {
setShuffleTrial(displayTrials.last_number)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain the purpose of this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, it is mistaken. This is a trial function that avoids giving bias due to position.

@@ -12,40 +17,108 @@ const PreferentialTrial: FC<{
const theme = useTheme()
const action = actionCreator()
const trialWidth = 500
const trialHeight = 300
const [hover, setHover] = useState(false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please avoid to use state for the performance reason? We should write the animation in CSS.

@c-bata c-bata changed the title update feedback screen Improve human feedback UI for Preferential Optimization Aug 25, 2023
Comment on lines 104 to 121
<Modal open={detailShown} onClose={() => setDetailShown(false)}>
<Box
sx={{
position: "relative",
width: "70%",
left: "15%",
top: theme.spacing(8),
backgroundColor: theme.palette.mode === "dark" ? "black" : "white",
}}
>
<TrialListDetail
trial={trial}
isBestTrial={() => false}
directions={[]}
objectiveNames={[]}
/>
</Box>
</Modal>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you update the styles as the following PR sets borderRadius and uses position: "absolute"?
#552

@moririn2528
Copy link
Contributor Author

Thank you for reviewing. I fixed them.

@c-bata c-bata self-assigned this Aug 28, 2023
Comment on lines 123 to 126
position: "absolute",
width: "70%",
left: "15%",
top: theme.spacing(8),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
position: "absolute",
width: "70%",
left: "15%",
top: theme.spacing(8),
position: "absolute",
top: 0,
left: 0,
right: 0,
bottom: 0,
width: "80%",
maxHeight: "90%",
margin: "auto",

How about positioning to the center like this?

Screenshot 2023-08-28 16 27 00

top: 0,
left: 0,
color: "red",
fontSize: trialWidth / 2,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there something effect on this? I removed this line, but cannot see any changes actually.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "fontSize" does not affect it, so I erased it.
However, this icon did not appear when I tried to remove any other.

sx={{
width: trialWidth,
minHeight: trialHeight,
position: "relative",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain why this component should be position: relative?

Copy link
Member

@c-bata c-bata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Thank you for the updates.

@c-bata c-bata merged commit 813f484 into optuna:main Aug 28, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants