Storages

class optuna.storages.RDBStorage(url, engine_kwargs=None, skip_compatibility_check=False)[source]

Storage class for RDB backend.

Note that library users can instantiate this class, but the attributes provided by this class are not supposed to be directly accessed by them.

Example

We create an RDBStorage instance with customized pool_size and max_overflow settings.

>>> import optuna
>>>
>>> def objective(trial):
>>>     ...
>>>
>>> storage = optuna.storages.RDBStorage(
>>>     url='postgresql://foo@localhost/db',
>>>     engine_kwargs={
>>>         'pool_size': 20,
>>>         'max_overflow': 0
>>>     }
>>> )
>>>
>>> study = optuna.create_study(storage=storage)
>>> study.optimize(objective)
Parameters: