Interface IBaseJournalSnapshot
- Namespace
- OptunaSharp.Storages.Journal
- Assembly
- OptunaSharp.dll
Optional base interface for Journal storages. Port of BaseJournalSnapshot
(a mixin class in Python; an interface in C#).
Storage classes implementing this may work faster when constructing the internal state from the large amount of logs.
public interface IBaseJournalSnapshot
Methods
LoadSnapshot()
Load snapshot from the backend, or null if not found.
byte[]? LoadSnapshot()
Returns
- byte[]
Snapshot bytes, or null when no snapshot is available.
Exceptions
- Exception
The snapshot backend fails to read the saved state.
SaveSnapshot(byte[])
Save snapshot to the backend.
void SaveSnapshot(byte[] snapshot)
Parameters
snapshotbyte[]Opaque serialized replay state to persist atomically according to the backend contract.
Exceptions
- Exception
The snapshot backend cannot persist the bytes.