optuna-dashboard icon indicating copy to clipboard operation
optuna-dashboard copied to clipboard

Add filter for `Best Trial` on trails list page

Open Koen1999 opened this issue 2 years ago • 6 comments

Feature Request

Currently, there is no way to filter for trials with the Best Trial attribute on the trials list page of the dashboard. (http://localhost:8080/dashboard/studies/1/trials) I am aware an overview of best trials is provided on the homepage of the study, but this overview does not contain all details such as duration and notes.

The filter can be implemented as a checkbox in the following menu: image

Koen1999 avatar Oct 10 '23 13:10 Koen1999

I have also missed this from time to time. Just thinking aloud, a "sort by value" could solve this problem and others too?

turbotimon avatar May 22 '25 10:05 turbotimon

hi! I started working on this feature.

im implementing a “Best Trial” filter in the trials list page (along with URL persistence via a best=true query parameter). i have it working locally (UI toggle, filtering logic, URL sync, and navigation preservation).

i can open a PR shortly, please let me know if you'd like any adjustments or if this can be assigned to me. im new to open-source contributing, so I appreciate any guidance if I've missed something.

screenshot of the updated filter Image

with Best Filter ticked Image

VihaanMotwani avatar Nov 15 '25 03:11 VihaanMotwani

@VihaanMotwani , Great to hear you started implementing this! I think there can be multiple best trials simultaneously if several trials obtain the same score. So maybe, it's nice if it also show the number of trials that will be displayed.

I cannot assign the issue to you since I am not a maintainer of this project.

Koen1999 avatar Nov 15 '25 10:11 Koen1999

thanks for the feedback! i wanted to clarify something:

currently, the other filter counts (Complete, Pruned, Fail, etc.) always show the total number of trials in each state, regardless of any filters that are applied. given that, should the “Best Trial (N)” label:

Option A: also display the total number of best trials in the study (matching existing filter behavior) OR Option B: display the number of best trials after applying the current filters

im happy to adapt either way!

VihaanMotwani avatar Nov 17 '25 01:11 VihaanMotwani

@VihaanMotwani , if it were up to me, I would go with option B. The other filters have the advantage of being mutually exclusive.

Koen1999 avatar Nov 17 '25 10:11 Koen1999

yeah that makes sense. i'll make the necessary changes and create a PR shortly!

VihaanMotwani avatar Nov 17 '25 19:11 VihaanMotwani