Add filter for `Best Trial` on trails list page
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:
I have also missed this from time to time. Just thinking aloud, a "sort by value" could solve this problem and others too?
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
with Best Filter ticked
@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.
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 , if it were up to me, I would go with option B. The other filters have the advantage of being mutually exclusive.
yeah that makes sense. i'll make the necessary changes and create a PR shortly!