Sweep Aggregate API Reference
Complete API documentation for parameter sweep aggregate outputs, including JSON schema, CSV format, and programmatic analysis examples.
Overview
When running parameter sweeps with AIPerf (e.g., --concurrency 10,20,30), the system generates sweep aggregate files that summarize performance across all parameter combinations. These aggregates enable:
- Comparison of performance across parameter combinations
- Identification of optimal configurations
- Pareto frontier analysis for multi-objective optimization
- Statistical analysis with confidence intervals (when using
--num-profile-runs > 1)
Output Files
Sweep aggregates are written to different locations depending on the sweep mode:
Independent Mode (sweep-only, no --num-profile-runs):
Repeated Mode (sweep with --num-profile-runs > 1):
The sweep aggregate files contain cross-value analysis including best configurations and Pareto optimal points.
JSON Schema
Top-Level Structure
Top-Level Fields:
Metadata Section
Contains information about the sweep configuration.
Fields:
Sweep Parameters Structure:
Each parameter definition contains:
name: Parameter name (e.g.,"concurrency","request_rate")values: List of values tested for this parameter
Per-Combination Metrics Section
Contains aggregated metrics for each parameter combination. This is a list where each entry represents one combination.
Combination Entry Fields:
Metric Statistics Fields:
Note: For single-trial sweeps (--num-profile-runs 1), only mean and unit fields are present.
Best Configurations Section
Identifies the parameter combinations that achieved the best performance for key metrics.
Configuration Fields:
Available Configurations:
best_throughput: Highestrequest_throughput_avgbest_latency_p99: Lowestttft_p99_ms(orrequest_latency_p99as fallback)
Pareto Optimal Section
Lists parameter combinations that are Pareto optimal - configurations where no other configuration is strictly better on all objectives simultaneously.
Default Objectives:
- Maximize:
request_throughput_avg(throughput) - Minimize:
ttft_p99_ms(latency)
A configuration is Pareto optimal if:
- No other configuration has both higher throughput AND lower latency
- It represents a valid trade-off point on the efficiency frontier
Example Interpretation:
Multi-Parameter Sweeps:
For sweeps with multiple parameters (e.g., --concurrency 10,20 --request-rate 5,10), each Pareto optimal entry contains all parameter values:
CSV Format
The CSV export provides a tabular view optimized for spreadsheet analysis and plotting.
Structure
The CSV file contains multiple sections separated by blank lines:
- Per-Combination Metrics Table (main data)
- Best Configurations
- Pareto Optimal Points
- Metadata
Per-Combination Metrics Table
The first section is a wide-format table with one row per parameter combination:
Columns:
- Parameter columns (e.g.,
concurrency,request_rate) - For each metric:
{metric}_mean,{metric}_std,{metric}_min,{metric}_max,{metric}_cv
Multi-Parameter Example:
Best Configurations Section
For multi-parameter sweeps:
Pareto Optimal Section
For multi-parameter sweeps:
Metadata Section
Artifact Directory Structure
Repeated Mode (--parameter-sweep-mode repeated)
Default mode where the full sweep is executed N times:
Execution Pattern:
Independent Mode (--parameter-sweep-mode independent)
All trials at each parameter value before moving to the next:
Execution Pattern:
Single-Trial Sweep
When --num-profile-runs 1 (or omitted), no trial directories are created:
Programmatic Analysis Examples
Example 1: Load and Inspect Sweep Results
Example 2: Find Optimal Configuration
Example 3: Analyze Pareto Frontier
Example 4: Compare Confidence Intervals
Example 5: Export to Pandas DataFrame
Example 6: Multi-Parameter Sweep Analysis
Example 7: Identify Diminishing Returns
Example 8: Multi-Objective Decision Making
See Also
- Parameter Sweeping Tutorial - User guide with examples
- Multi-Run Confidence Tutorial - Understanding confidence statistics
- Working with Profile Exports - General export analysis
- CLI Options Reference - Complete CLI documentation