You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a new study with a sqlite database using optuna.create_study, the function call should succeed and a new study should be created.
Environment
Optuna version: 3.0.5
Python version: 3.8.15
OS: Linux-5.15.0-58-generic-x86_64-with-glibc2.10
(Optional) Other libraries and their versions:
Error messages, stack traces, or logs
>>> import optuna
>>> ss = optuna.create_study(study_name='foo', storage='sqlite:///foo.db')
Traceback (most recent call last):
File "<stdin>", line 1, in<module>
File "/usr/local/data/ahollid/mambaforge/envs/ptlearn/lib/python3.8/site-packages/optuna/_convert_positional_args.py", line 63, in converter_wrapper
return func(**kwargs)
File "/usr/local/data/ahollid/mambaforge/envs/ptlearn/lib/python3.8/site-packages/optuna/study/study.py", line 1147, in create_study
storage = storages.get_storage(storage)
File "/usr/local/data/ahollid/mambaforge/envs/ptlearn/lib/python3.8/site-packages/optuna/storages/__init__.py", line 32, in get_storage
return _CachedStorage(RDBStorage(storage))
File "/usr/local/data/ahollid/mambaforge/envs/ptlearn/lib/python3.8/site-packages/optuna/storages/_rdb/storage.py", line 225, in __init__
self._version_manager.check_table_schema_compatibility()
File "/usr/local/data/ahollid/mambaforge/envs/ptlearn/lib/python3.8/site-packages/optuna/storages/_rdb/storage.py", line 1134, in check_table_schema_compatibility
current_version = self.get_current_version()
File "/usr/local/data/ahollid/mambaforge/envs/ptlearn/lib/python3.8/site-packages/optuna/storages/_rdb/storage.py", line 1161, in get_current_version
assert version is not None
AssertionError
This is something I've observed happen on two different machines now. Any time I try to create a study in a sqlite database by passing a url of the form `sqlite:///my_study_name.db', the above error is thrown, but only on certain machines where I've tried to run it, despite the fact that I'm running off the same conda environment with the same software versions in each case. On machines where it doesn't work, the two-line minimal example I gave is enough, but on other machines I can run the same code with no problem, so I can't really give instructions to reproduce the issue.
The text was updated successfully, but these errors were encountered:
AHolliday
added
the
bug
Issue/PR about behavior that is broken. Not for typos/examples/CI/test but for Optuna itself.
label
Feb 6, 2023
AHolliday
changed the title
Unpredictable failures in
AssertionError thrown when creating study, but only on some machines
Feb 6, 2023
I found that downgrading SQLAlchemy from version 2.0.0 to version 1.4.46 resolves the issue, as suggested by #4294 (comment). Closing the issue, since I suppose this means it's an issue with SQLAlchemy.
Expected behavior
When creating a new study with a sqlite database using
optuna.create_study
, the function call should succeed and a new study should be created.Environment
Error messages, stack traces, or logs
Steps to reproduce
Additional context (optional)
This is something I've observed happen on two different machines now. Any time I try to create a study in a sqlite database by passing a url of the form `sqlite:///my_study_name.db', the above error is thrown, but only on certain machines where I've tried to run it, despite the fact that I'm running off the same conda environment with the same software versions in each case. On machines where it doesn't work, the two-line minimal example I gave is enough, but on other machines I can run the same code with no problem, so I can't really give instructions to reproduce the issue.
The text was updated successfully, but these errors were encountered: