fitbenchmarking.utils.checkpoint module
This file implements a checkpointclass to save results as they are generated. This is also used to read in checkpointed data.
- class fitbenchmarking.utils.checkpoint.Checkpoint(options: Options)
Bases:
object
A class to build a checkpoint file. Each run can be added to the file as they finish. This class must be finalised to create the checkpoint.
- add_result(result: FittingResult)
Add the result to the checkpoint file.
- Parameters:
result (FittingResult) – The result to add.
- finalise()
Add the trailing bracket to validate the json.
- finalise_group(label='benchmark', failed_problems=None, unselected_minimizers=None)
Combine the problem and results file into the main checkpoint file.
- load()
Load fitting results from a checkpoint file along with failed problems and unselected minimizers.
- Returns:
Instantiated fitting results, unselected minimisers, failed problems config
- Return type:
Tuple[dict[str, list[FittingResult]], dict, dict[str, list[str]], dict]