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

Show the best value on study detail page. #252

Open
lyhue1991 opened this issue Jul 8, 2022 · 1 comment
Open

Show the best value on study detail page. #252

lyhue1991 opened this issue Jul 8, 2022 · 1 comment
Labels
contribution-welcome Welcome your contributions enhancement New feature or request no-stale Exempt from stale bot

Comments

@lyhue1991
Copy link

Description

When update to v0.7.0, the BestValue in the homepage is missed.
But this information is very important for user to fast see the experiment's status.
I think this may be a bug when

The homepage of v0.7.1

The homepage of v0.6.4

How to Reproduce

create an study like below using optuna and open optuna-dashboard to visualize.

import optuna
import datetime
from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
from sklearn.neural_network import MLPClassifier


def objective(trial):
    data,target = make_classification(n_samples=1000,n_features=20,
            n_informative=12,n_redundant=4,n_repeated=0,n_classes=4,
            n_clusters_per_class=4)

    x_train, x_valid, y_train, y_valid = train_test_split(data, target)
    classes = list(set(target))

    clf = MLPClassifier(
        hidden_layer_sizes=tuple(
            [trial.suggest_int("n_units_l{}".format(i), 32, 64) for i in range(5)]
        ),
        learning_rate_init=trial.suggest_float("lr_init", 1e-5, 1e-1, log=True),
    )

    
    for step in range(200):
        clf.partial_fit(x_train, y_train, classes=classes)
        value = clf.score(x_valid, y_valid)

        # Report intermediate objective value.
        trial.report(value, step)

        # Handle pruning based on the intermediate value.
        if trial.should_prune():
            raise optuna.TrialPruned()
            

    return value

storage_name = "sqlite:///optuna.db"
nowtime = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
study = optuna.create_study(direction="maximize", pruner=optuna.pruners.MedianPruner(),
                            study_name="mlp", storage=storage_name, load_if_exists=True)
study.optimize(objective, n_trials=200, timeout=3600)

Python version

3.7

Optuna version

Output of $ python -c 'import optuna; print(optuna.__version__)'

optuna-dashboard version or git revision

0.7.1

Web browser

chrome

@lyhue1991 lyhue1991 added the bug Something isn't working label Jul 8, 2022
@c-bata
Copy link
Member

c-bata commented Jul 11, 2022

Thank you for opening an issue.
I deliberately removed the "Best Value" column due to the performance reasons.

Therefore, you need to sort trials by objective value in TrialTable in order to check the best value. It is a bit cumbersome, so I will try to think of a way to see "Best Value" easily as before. Sorry for the inconvenience.

@c-bata c-bata added enhancement New feature or request contribution-welcome Welcome your contributions and removed bug Something isn't working labels Jul 11, 2022
@c-bata c-bata changed the title BestValue is missed when update to v0.7.0 or v0.7.1 Show best value on study detail page. Aug 4, 2022
@c-bata c-bata changed the title Show best value on study detail page. Show the best value on study detail page. Aug 4, 2022
@keisuke-umezawa keisuke-umezawa added the no-stale Exempt from stale bot label Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution-welcome Welcome your contributions enhancement New feature or request no-stale Exempt from stale bot
Projects
None yet
Development

No branches or pull requests

3 participants