Description
Starting the dashboard works fine, both with sqlite and mysql.
When I open the dashboard in the browser i see
Failed to fetch study (reason=internal server error)
The logs show the following:
Exception: 'list' object has no attribute 'get'
File "/Users/username/projects/project/.env/lib/python3.9/site-packages/optuna_dashboard/_bottle_util.py", line 31, in decorated
response_body = view(*args, **kwargs)
File "/Users/username/projects/project/.env/lib/python3.9/site-packages/optuna_dashboard/_app.py", line 227, in get_study_detail
return serialize_study_detail(
File "/Users/username/projects/project/.env/lib/python3.9/site-packages/optuna_dashboard/_serializer.py", line 152, in serialize_study_detail
serialized["trials"] = [
File "/Users/username/projects/project/.env/lib/python3.9/site-packages/optuna_dashboard/_serializer.py", line 153, in <listcomp>
serialize_frozen_trial(summary._study_id, trial, system_attrs) for trial in trials
File "/Users/username/projects/project/.env/lib/python3.9/site-packages/optuna_dashboard/_serializer.py", line 240, in serialize_frozen_trial
"fixed_params": [
File "/Users/username/projects/project/.env/lib/python3.9/site-packages/optuna_dashboard/_serializer.py", line 241, in <listcomp>
{"name": param_name, "param_external_value": str(fixed_params.get(param_name, None))}
How to Reproduce
- Optuna's objective function is
def tpe_objective_fn(trial, observations):
num_steps = observations["lb"].shape[0]
num_heat_sources = observations["lb"].shape[1]
lb = observations["lb"].flatten()
ub = observations["ub"].flatten()
chosen_parameters = []
for step in range(num_steps):
for idx in range(num_heat_sources):
chosen_parameters.append(
trial.suggest_float(f"tech_param_{step}_{idx}", lb[idx], ub[idx])
)
cost = cost_function(
chosen_parameters,
num_steps,
)
return cost
- Run optuna-dashboard with
optuna-dashboard mysql://user:password@127.0.0.1:3307/optuna
- Open http://127.0.0.1:8080/ page.
- An error occurs.
Python version
3.9.6
Optuna version
3.4.0
optuna-dashboard version or git revision
0.13.0
Web browser
Chrome
Description
Starting the dashboard works fine, both with sqlite and mysql.
When I open the dashboard in the browser i see
Failed to fetch study (reason=internal server error)The logs show the following:
How to Reproduce
optuna-dashboard mysql://user:password@127.0.0.1:3307/optunaPython version
3.9.6
Optuna version
3.4.0
optuna-dashboard version or git revision
0.13.0
Web browser
Chrome