BenchmarkingResults#
- class BenchmarkingResults(path: str, results: list[~sktime.benchmarking._benchmarking_dataclasses.ResultObject] = <factory>)[source]#
Utility for writing and loading benchmark results to and from disk.
BenchmarkingResultsis the in-memory representation of a persisted benchmark results file. On construction it loads any data already stored at providedpath— either from a completed output file or from crash-safe partial checkpoints left by an interrupted run ({path}.parts/).The primary user-facing entry point is to_df, which returns the same flat summary table produced by
BaseBenchmark.run().For structured access to individual experiments, use the
resultsattribute, which holds a list of ResultObject instances.During benchmark runs, internally
BaseBenchmark.run()usesBenchmarkingResultsas a mutable container while experiments execute: it skips completed task-model pairs (checked using_contains), appends new results with incremental checkpointing (using_update), and writes the final output file (using_save). These methods are not part of the public API.All file I/O is delegated to BenchmarkResultsPersistence.
- Parameters:
- pathstr or None
Path to the benchmark results file (e.g.
"results.json"). Must refer to a file, not a directory; the file extension determines the final storage format (.json,.csv, or.parquet). WhenNone, results are kept in memory only and no file I/O occurs.- resultslist of ResultObject, optional
In-memory result list. Overwritten on init by loading from persistence when saved data exists at
pathor in its checkpoint directory.
Examples
>>> from sktime.benchmarking import BenchmarkingResults >>> df = BenchmarkingResults("results.csv").to_df()
Methods
to_df()Convert in-memory results to a summary pandas DataFrame.