MCP Tools
ochreml_predict
Run batch predictions using a saved .dit model on a CSV, TSV, or Parquet dataset.
ochreml_predict loads a persisted .dit model, runs inference on an input dataset, and returns a preview of predictions—optionally writing full predictions to a .csv or .json file inside the allowed MCP root.
It is backed by ochreml._ops.op_predict().
Input Schema
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model_path | string | Yes | — | Path to .dit model file (.dit extension enforced). |
data_path | string | Yes | — | Path to input dataset (CSV, TSV, or Parquet). |
out_path | string | No | null | Optional output file path (.json writes {"predictions": [...]}, any other extension writes a single-column prediction CSV). |
target | string | No | null | Optional target column name to drop if present in data_path. |
Guardrails
model_pathis validated withrequire_dit=True.data_pathand optionalout_pathare validated with_resolve_contained().- If
model.predict()returns multi-class logits (e.g. fromnn.Sequential),_predict_model()automatically appliesargmaxper row.
Example JSON-RPC Call
{
"jsonrpc": "2.0",
"id": 7,
"method": "tools/call",
"params": {
"name": "ochreml_predict",
"arguments": {
"model_path": "models/housing_ridge.dit",
"data_path": "data/housing_test.csv",
"out_path": "outputs/preds.csv",
"target": "price"
}
}
}Response Fields
| Field | Type | Description |
|---|---|---|
model_path | string | Resolved .dit model path. |
model_type | string | Loaded estimator class name. |
n_samples | integer | Total number of predictions produced. |
out_path | string | null | Resolved output path if written, otherwise null. |
predictions_preview | number[] | First 20 predicted values. |
predictions | number[] | Included only when out_path is omitted and n_samples <= 500. |