MCP Tools
ochreml_eval
Evaluate a saved .dit model on labeled data using zero-dependency classification or regression metrics.
ochreml_eval loads a .dit model, runs predictions on a labeled CSV, TSV, or Parquet dataset, and computes classification or regression metrics in pure Python with zero external dependencies.
It is backed by ochreml._ops.op_eval().
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 labeled dataset. |
target | string | Yes | — | Target column name. |
task | string | No | "auto" | Enum: "auto", "classification", or "regression". |
Task Auto-Detection
When task is "auto", OchreML infers the task in order:
- If the loaded model has
classes_,"Classifier"in its class name, or ends with"NB"or"SVC"->"classification". - If the class name contains
"Regressor"or is inLinearRegression,Ridge,RidgeCV,Lasso,ElasticNet,SVR,KernelRidge->"regression". - Otherwise, falls back to inspecting the target vector
y.
Example JSON-RPC Call
{
"jsonrpc": "2.0",
"id": 8,
"method": "tools/call",
"params": {
"name": "ochreml_eval",
"arguments": {
"model_path": "models/iris_rf.dit",
"data_path": "data/iris_val.csv",
"target": "species",
"task": "auto"
}
}
}Response Fields
| Field | Type | Description |
|---|---|---|
model_path | string | Resolved .dit model path. |
model_type | string | Loaded estimator class name. |
task | string | Resolved task ("classification" or "regression"). |
n_samples | integer | Number of evaluated samples. |
metrics | object | Computed metric dictionary (rounded to 6 decimal places). |
Metrics Returned
- Classification:
accuracy,f1_macro,precision_macro,recall_macro, andlog_loss(when the model exposespredict_proba()). - Regression:
r2,rmse,mae,mse.