optuna-dashboard icon indicating copy to clipboard operation
optuna-dashboard copied to clipboard

get_all_study_summaries throws Exception: list index out of range when loading study in optuna-dashboard

Open blazespinnaker opened this issue 2 years ago • 5 comments

Expected behavior

Study should load dashboard so I can visualize, traverse table of parameter info

Environment

  • Optuna version: 2.10.1
  • Python version: 3.8.10
  • OS:Linux-5.4.0-122-generic-x86_64-with-glibc2.29
  • (Optional) Other libraries and their versions: optuna-dashboard version is 0.7.2

Error messages, stack traces, or logs

xception: list index out of range
  File "/home//.local/lib/python3.8/site-packages/optuna_dashboard/_app.py", line 130, in decorated
    response_body = view(*args, **kwargs)

  File "/home//.local/lib/python3.8/site-packages/optuna_dashboard/_app.py", line 295, in get_study_detail
    summary = get_study_summary(storage, study_id)

  File "/home//.local/lib/python3.8/site-packages/optuna_dashboard/_app.py", line 153, in get_study_summary
    summaries = get_study_summaries(storage)

  File "/home//.local/lib/python3.8/site-packages/optuna_dashboard/_app.py", line 149, in get_study_summaries
    return storage.get_all_study_summaries()  # type: ignore

  File "/home//.local/lib/python3.8/site-packages/optuna/storages/_rdb/storage.py", line 419, in get_all_study_summaries
    elif directions[0] == StudyDirection.MAXIMIZE:

Steps to reproduce

  1. Click on study in optuna-dashboard
  2. blank page stuck at NOW LOADING
# python code

Additional context (optional)

I've deleted and run this study a number of different times without changing anything except internal models, so the error is very non deterministic. It is distributed though over 13 different python processes, so maybe a race condition issue?

study creation code:

storage = optuna.storages.RDBStorage(
       url='sqlite:///db.sqlite',
       heartbeat_interval = 360,
   )

   study = optuna.create_study(study_name=f"**",
                               storage=storage, sampler =
                               optuna.samplers.TPESampler(multivariate = True, constant_liar = True),
                               load_if_exists=True)
   study.optimize(objective, n_trials=250)

blazespinnaker avatar Aug 11 '22 23:08 blazespinnaker

Some further context: I did use pkill a couple of times on the processes running and restarted the study optimizations

blazespinnaker avatar Aug 11 '22 23:08 blazespinnaker

Further note - Restarting optuna-dashboard seems to have fixed it.

blazespinnaker avatar Aug 11 '22 23:08 blazespinnaker

I suppose the issue is related to the optuna-dashboard, right? Can I transfer this issue to https://github.com/optuna/optuna-dashboard/issues instead of here for other users?

nzw0301 avatar Aug 12 '22 03:08 nzw0301

I suppose the issue is related to the optuna-dashboard, right? Can I transfer this issue to https://github.com/optuna/optuna-dashboard/issues instead of here for other users?

@c-bata If possible, could you transfer this issue to optuna-dashboard?

toshihikoyanase avatar Aug 22 '22 04:08 toshihikoyanase

Sure. Thank you for letting me know!

c-bata avatar Aug 22 '22 06:08 c-bata

This issue has not seen any recent activity.

github-actions[bot] avatar Sep 21 '23 23:09 github-actions[bot]

This issue was closed automatically because it had not seen any recent activity. If you want to discuss it, you can reopen it freely.

github-actions[bot] avatar Sep 28 '23 23:09 github-actions[bot]