Skip to Content
OchreML
MCP Tools

ochreml_bench

Run a fast synthetic benchmark across 5 core OchreML workloads on the selected hardware device.

ochreml_bench generates deterministic synthetic regression and classification matrices (seed=42) in memory and times fit() and predict() across 5 core OchreML workloads. It requires no dataset files or filesystem access.

It is backed by ochreml._ops.op_bench().

Input Schema

ParameterTypeRequiredDefaultDescription
devicestringNo"auto"Target device (auto, cpu, cuda:0, cuda:all, wgpu, tpu).

Workloads Benchmarked

  1. LinearRegression (2000x16)
  2. Ridge (2000x16) (alpha=1.0)
  3. RandomForestClassifier (1000x12, 15 trees) (max_depth=6)
  4. HistGradientBoostingRegressor (2000x16, 20 iters) (max_iter=20)
  5. KMeans (1000x12, k=4) (n_clusters=4, max_iter=30)

Example JSON-RPC Call

{
  "jsonrpc": "2.0",
  "id": 10,
  "method": "tools/call",
  "params": {
    "name": "ochreml_bench",
    "arguments": {
      "device": "auto"
    }
  }
}

Response Fields

FieldTypeDescription
versionstringInstalled OchreML version.
requested_devicestringDevice argument passed to ochreml_bench.
available_devicesstring[]Devices discovered on the host.
total_time_secnumberTotal benchmark runtime in seconds.
benchmarksobject[]Per-workload timing entries: workload, device, n_samples, n_features, fit_ms, predict_ms.

On this page