Skip to content

Add JSON output for benchmark results#8027

Draft
dantegd wants to merge 32 commits into
rapidsai:mainfrom
dantegd:fea-bench-json-output
Draft

Add JSON output for benchmark results#8027
dantegd wants to merge 32 commits into
rapidsai:mainfrom
dantegd:fea-bench-json-output

Conversation

@dantegd
Copy link
Copy Markdown
Member

@dantegd dantegd commented Apr 28, 2026

Builds on top of #7980

This PR adds a structured JSON output path for cuML benchmarks. Benchmark runs can now write a single canonical JSON artifact containing grouped benchmark results and run metadata, including backend timings, accuracy metrics, benchmark shape, selected config/profile information, hardware metadata, package environment snapshots, and estimator parameters when available.

This PR also improves benchmark console output for long runs. Instead of repeated per-run DataFrame dumps, the runner now emits a concise aligned progress table with algorithm, shape, estimated data size, backend timings, and compact details like accuracy and speedup.

Why JSON Output

I think YAML remains the right format for benchmark configuration because it is human-authored, reviewable, and easy to maintain. JSON is the right format for benchmark output because it is machine-produced, schema-versioned, and easy for CI, dashboards, and future baseline comparison tooling to consume.

YAML in: human-authored benchmark intent
JSON out: machine-readable benchmark facts

JSON Schema

The JSON artifact has two top-level fields:

{
  "results": [],
  "metadata": {}
}

Each result represents one logical benchmark variation:

{
  "benchmark_id": "logreg_fit_narrow_default",
  "algorithm": "LogisticRegression",
  "dataset": "classification",
  "operation": "fit",
  "shape": {
    "rows": 84000000,
    "features": 16,
    "estimated_input_size_bytes": 5376000000,
    "estimated_input_size_gb": 5.376
  },
  "data": {
    "input_type": "cupy",
    "dtype": "fp32",
    "n_reps": 1
  },
  "params": {
    "declared": {},
    "effective": {
      "cpu": null,
      "gpu": {},
      "accel": null
    }
  },
  "backends": {
    "gpu": {
      "status": "success",
      "time_sec": 0.91,
      "accuracy": 0.995
    }
  }
}

Run metadata includes schema version, command, Python/platform information, cuML/git identity, runtime availability, config/profile selection, hardware details, and a compact conda or pip package snapshot.

Backend records currently use:

  • status: success or skipped
  • time_sec: benchmark time in seconds for successful runs
  • accuracy: accuracy or score when available
  • reason: explanation for skipped backends

Highlights

  • Adds --output results.json as the canonical benchmark artifact.
  • Writes a single JSON file with top-level results followed by metadata.
  • Groups backend results under each logical benchmark variation.
  • Captures backend status for successful and skipped runs.
  • Captures declared parameters and effective estimator parameters when available.
  • Captures run metadata including command, config/profile, Python/platform, cuML/git info, GPU availability, hardware details, and compact conda/pip package snapshots.
  • Adds hardware metadata overrides for cleaner reporting labels.
  • Keeps --csv as a legacy flat export.

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Apr 28, 2026

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions github-actions Bot added conda conda issue Cython / Python Cython or Python issue labels Apr 28, 2026
@dantegd dantegd changed the title Add canonical JSON output for benchmark results Add JSON output for benchmark results Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conda conda issue Cython / Python Cython or Python issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants