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

Fix sort in rank plot #718

Merged
merged 1 commit into from
Dec 4, 2023
Merged

Fix sort in rank plot #718

merged 1 commit into from
Dec 4, 2023

Conversation

not522
Copy link
Member

@not522 not522 commented Nov 30, 2023

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

This feature has been introduced by #656.

What does this implement/fix? Explain your changes.

The sorting in the rank plot is not correct because the values are sorted as strings. This PR will fix the bug by specifying a compare function.

Copy link

codecov bot commented Nov 30, 2023

Codecov Report

Attention: 25 lines in your changes are missing coverage. Please review.

Comparison is base (caa2d0c) 65.80% compared to head (bee7c97) 65.80%.
Report is 70 commits behind head on main.

Files Patch % Lines
optuna_dashboard/artifact/_backend.py 28.57% 25 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #718   +/-   ##
=======================================
  Coverage   65.80%   65.80%           
=======================================
  Files          35       35           
  Lines        2293     2293           
=======================================
  Hits         1509     1509           
  Misses        784      784           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@c-bata

This comment was marked as outdated.

@not522 not522 added the bug Something isn't working label Dec 1, 2023
@c-bata c-bata assigned c-bata and unassigned keisuke-umezawa Dec 1, 2023
@c-bata c-bata merged commit f79ef22 into optuna:main Dec 4, 2023
11 checks passed
@not522 not522 deleted the fix-rank branch December 4, 2023 07:19
@@ -274,7 +274,7 @@ const getColors = (values: number[]): number[] => {
}

const getOrderWithSameOrderAveraging = (values: number[]): number[] => {
const sortedValues = values.slice().sort()
Copy link
Member

Choose a reason for hiding this comment

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

This causes a bug when there are inf values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants