optuna.storages.BaseJournalLogStorage
- class optuna.storages.BaseJournalLogStorage(*args, **kwargs)[source]
Base class for Journal storages.
Storage classes implementing this base class must guarantee process safety. This means, multiple processes might concurrently call
read_logs
andappend_logs
. If the backend storage does not internally support mutual exclusion mechanisms, such as locks, you might want to useJournalFileSymlinkLock
orJournalFileOpenLock
for creating a critical section.Warning
Deprecated in v4.0.0. This feature will be removed in the future. The removal of this feature is currently scheduled for v6.0.0, but this schedule is subject to change. See https://github.com/optuna/optuna/releases/tag/v4.0.0.
Use
BaseJournalBackend
instead.Methods
append_logs
(logs)Append logs to the backend.
read_logs
(log_number_from)Read logs with a log number greater than or equal to
log_number_from
.- abstract append_logs(logs)
Append logs to the backend.
- abstract read_logs(log_number_from)
Read logs with a log number greater than or equal to
log_number_from
.If
log_number_from
is 0, read all the logs.