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
O(1) cached RDB storage trial select queries. #1426
Conversation
93b82db
to
9c5dbea
Compare
9c5dbea
to
9157174
Compare
Lacking precision in
|
Enqueue tests seem to be failing because the update timestamp is not updated when the |
In my understanding
|
This pull request has not seen any recent activity. |
Closing this issue for now, for reasons mentioned above. |
Motivation
Follow-up of #1405 (thus depends on it) and addresses #1383. In short, optimizes trial select queries from O(cached trials) to O(1) for the cached RDB storage. The difference becomes clear when the number of trials increase.
Description of the changes
Changes to use the update timestamp when querying trials instead of using an exclusion list that grows linearly as the number of trials increase.
TODO
Benchmarks (Preliminary. See TODO above)
PR
Time 43.876389265060425
master
Time 59.81723189353943
You can clearly notice that each trial becomes more time consuming as the number of trials increase. This issue is mitigated by this change.
Note
I decided to not introduce the "last update" attribute to the
FrozenTrial
as it's not necessary. This is purely an internal performance improvement. It could make debugging in the future difficult though. Open for feedback.