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:
Sweep-only (no --num-profile-runs):
Independent Mode (sweep + --num-profile-runs > 1 + --parameter-sweep-mode independent):
Repeated Mode (sweep + --num-profile-runs > 1, default mode):
See Artifact Directory Layout Reference below for the full table of layout cases.
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:
Note: For QMC sweeps, sampling_design.json is written to <base>/sweep_aggregate/sampling_design.json in single-trial and independent modes. In repeated multi-run mode the sweep aggregate can live under <base>/aggregate/sweep_aggregate/, so the sampling design is not necessarily a sibling of the repeated-mode aggregate directory.
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: Fields se (standard error) and t_critical (critical t-value) exist on the underlying ConfidenceMetric dataclass and are emitted by the per-variation confidence aggregate (profile_export_aiperf_aggregate.json), but the sweep aggregate’s per-combination block strips them.
Note: For single-trial sweeps (--num-profile-runs 1 or omitted), the per-combination metric block still emits the full field set, but the spread fields collapse to degenerate values: std=0, cv=0, ci_low=ci_high=mean. The single-trial projection also emits an avg alias of mean and passes through every populated percentile field (p1, p5, p10, p25, p50, p75, p90, p95, p99) directly from the underlying JsonMetricResult.
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: Lowesttime_to_first_token_p99(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:
time_to_first_token_p99(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:
Empty frontier: When no frontier can be computed (a required objective metric is missing from the per-combination block, or every cell was filtered out by SLA constraints), the section renders a single literal None row beneath the Pareto Optimal Points header instead of the parameter-name header + rows.
Metadata Section
Artifact Directory Structure
Artifact Directory Layout Reference
The artifact tree branches on three flags: whether a sweep is configured
(is_sweep), whether multiple trials run per cell (trials > 1), and
the sweep iteration order (REPEATED vs INDEPENDENT).
<dir_name> is the {leaf_param_name}_{value} form (e.g.
concurrency_10, request_rate_5.0); multi-dim sweep cells join
components with __ (e.g. concurrency_10__isl_512). Inner-dir
naming is asymmetric on purpose: the no-sweep multi-run case uses
run_NNNN, the sweep + INDEPENDENT case uses trial_NNNN.
The sweep-level aggregate path follows a parallel rule:
- REPEATED + multi-run:
<base>/aggregate/sweep_aggregate/ - everything else (sweep-only, sweep + INDEPENDENT):
<base>/sweep_aggregate/
Per-variation aggregates land at <base>/aggregate/<dir_name>/ in
REPEATED mode and <base>/<dir_name>/aggregate/ in INDEPENDENT mode.
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