guidellm.benchmark.outputs.serialized
Serialized output handler for generative benchmark reports.
This module provides a serialized output implementation that saves benchmark reports to JSON or YAML file formats. It extends the base GenerativeBenchmarkerOutput to handle file-based persistence of benchmark results, supporting both directory and explicit file path specifications for report serialization.
GenerativeBenchmarkerSerialized
Bases: GenerativeBenchmarkerOutput
Serialized output handler for benchmark reports in JSON or YAML formats.
This output handler persists generative benchmark reports to the file system in either JSON or YAML format. It supports flexible path specification, allowing users to provide either a directory (where a default filename will be generated) or an explicit file path for the serialized report output.
Example: :: output = GenerativeBenchmarkerSerialized(output_path="/path/to/output.json") result_path = await output.finalize(report)
Source code in src/guidellm/benchmark/outputs/serialized.py
finalize(report) async
Serialize and save the benchmark report to the configured output path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
report | GenerativeBenchmarksReport | The generative benchmarks report to serialize | required |
Returns:
| Type | Description |
|---|---|
Path | Path to the saved report file |
Source code in src/guidellm/benchmark/outputs/serialized.py
from_args(args) classmethod
Create a serialized output formatter from output arguments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
args | BenchmarkOutputArgs | Output configuration with path and kind (json or yaml) | required |
Returns:
| Type | Description |
|---|---|
GenerativeBenchmarkerSerialized | Configured serialized output formatter |
Source code in src/guidellm/benchmark/outputs/serialized.py
JSONBenchmarkOutputArgs
Bases: BenchmarkOutputArgs
Model for JSON benchmark output arguments.
Source code in src/guidellm/benchmark/outputs/serialized.py
YAMLBenchmarkOutputArgs
Bases: BenchmarkOutputArgs
Model for YAML benchmark output arguments.