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

Conditional parameters are not shown appropriately #734

Closed
nabenabe0928 opened this issue Dec 18, 2023 · 3 comments
Closed

Conditional parameters are not shown appropriately #734

nabenabe0928 opened this issue Dec 18, 2023 · 3 comments
Labels
bug Something isn't working stale for stale bot

Comments

@nabenabe0928
Copy link
Collaborator

Description

In the trial table, parameters are not shown correctly and they will be shown in the json format when the search space has (a) conditional parameter(s).

image

How to Reproduce

Run the following:

import optuna


def objective(trial):
    category = trial.suggest_categorical("category", ["foo", "bar"])
    if category == "foo":
        return (trial.suggest_float("x1", 0, 10) - 2) ** 2
    else:
        return -((trial.suggest_float("x2", -10, 0) + 5) ** 2)


study = optuna.create_study(storage="sqlite:///test.db")
study.optimize(objective, n_trials=100)

And then check on the dashboard:

$ optuna-dashboard sqlite:///test.db

Python version

3.9

Optuna version

3.5.0

optuna-dashboard version or git revision

0.14.0

Web browser

Google Chrome

@nabenabe0928 nabenabe0928 added the bug Something isn't working label Dec 18, 2023
@adjeiv
Copy link
Contributor

adjeiv commented Dec 24, 2023

https://github.com/optuna/optuna-dashboard/blob/main/optuna_dashboard/ts/components/TrialTable.tsx#L94

Seems to be due to this condition, which is probably evaluating to false in the case of the conditional parameters. Did you have in mind to take the union of all set parameters, have a column for each, and for each trial to use the value if it exists? I only wonder whether the initial design was to prevent lots of blank column values.

Copy link

This issue has not seen any recent activity.

@github-actions github-actions bot added the stale for stale bot label Feb 22, 2024
@nabenabe0928
Copy link
Collaborator Author

This issue has been addressed by #740 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale for stale bot
Projects
None yet
Development

No branches or pull requests

2 participants