Optuna: A fast method for enumerating names of all studies

Created on 3 Dec 2019  路  4Comments  路  Source: optuna/optuna

The request is for a fast function optuna.study.get_all_study_names or similar.

Motivation

I am creating a user interface which allows the user to select which study they want to interact with. Ideally, this interface will have a list of existing studies to select from. At the moment the only way to get this list of names is to use the function optuna.study.get_all_study_summaries which not only loads study names, but also all trials from all studies. In the event that at least one study has a large number of trials, this method will take a long time to load. This is problematic if the names of the studies need to be loaded rapidly in a user interface.

Description

optuna.study.get_all_study_names() -> List[str]

Alternatives (optional)

It's possible that get_all_study_summaries could be made more performant and reduce the need of this particular new function. However, as the number of trials in the database grows, this solution becomes too slow to include in a real time user interface since it will unnecessarily take O(trials) time.

contribution-welcome feature stale

Most helpful comment

Related to #974 . Using RedisStorage drastically speeds up queries to the datastore ie: get_all_study_summaries gets really fast ;)

All 4 comments

Thanks @dwiel for raising a ticket for this issue.

get_all_study_names might be fine to introduce (but I'd personally like to consider alternatives as it seems a bit verbose in terms of API design). Let me label this issue as contribution welcomed.

As for get_all_study_summaries, there is a TODO comment, that you might be aware of, to optimize the underlying queries so this is something that must be addressed. I'm not sure how well that'll scale to the needs of this issue. I'll raise a separate issue for get_all_study_summaries.

Related to #974 . Using RedisStorage drastically speeds up queries to the datastore ie: get_all_study_summaries gets really fast ;)

This issue has not seen any recent activity.

@dwiel cc: @ytsmiling @hvy
I think we can close this issue, because it was solved by #1109. So I close it now.

But if you think we need to keep it, please reopen it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

djKooks picture djKooks  路  4Comments

CMobley7 picture CMobley7  路  3Comments

mateuszpieniak picture mateuszpieniak  路  3Comments

superluminance picture superluminance  路  4Comments

ChenjunZou picture ChenjunZou  路  4Comments