Saving and Loading#
Functions for saving and loading your experiment to stop and restart.
- boa.storage.scheduler_to_json_file(scheduler, filepath: PathLike = 'scheduler_snapshot.json') None[source]#
Save a JSON-serialized snapshot of this Scheduler’s settings and state to a .json file by the given path.
- Parameters:
filepath (PathLike) –
- Return type:
None
- boa.storage.scheduler_from_json_file(filepath: PathLike = 'scheduler.json', wrapper=None, **kwargs) Scheduler[source]#
Restore an Scheduler and its state from a JSON-serialized snapshot, residing in a .json file by the given path.
- Parameters:
filepath (PathLike) –
- Return type:
Scheduler
- boa.storage.scheduler_to_json_snapshot(scheduler: Scheduler, encoder_registry: Optional[Dict[Type, Callable[[Any], Dict[str, Any]]]] = None, class_encoder_registry: Optional[Dict[Type, Callable[[Any], Dict[str, Any]]]] = None) Dict[str, Any][source]#
Serialize this Scheduler to JSON to be able to interrupt and restart optimization and save it to file by the provided path.