mloop-mcp
v0.19.0MCP server for MLoop CLI - ML.NET MLOps tool
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
mloop_train
Train an ML model using AutoML. Runs mloop train command with specified parameters. Answers the run's result (experiment id, trainer, metrics, promotion) and warnings as JSON; reports progress per trial when the call carries a progress token; cancelling the call stops the run. Without time, the run sizes its own budget from the data.
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Path to MLoop project directory |
additionalDataFiles | array | Files merged after dataFile (e.g. a retraining set from mloop_sample create); a file without the weight column counts its rows 1 |
analyzeData | boolean | Check the data quality and train nothing: the answer carries `analysis` (each finding with a suggested fix; an empty list when there are none) instead of a result |
autoMerge | boolean | Detect and merge the CSV files of the same schema in datasets/ into the training data |
autoTime | boolean | true: size the time budget from the data even when mloop.yaml sets one; false: no estimation, the 300 s default budget; leave out: the run decides (a given `time` always wins) |
balance | string | Class balancing strategy for classification (image classification included — it oversamples its training split): "auto" (balance to 10:1), "none", or target ratio (e.g., "5" for 5:1) |
bankSize | integer | image-anomaly: the most patches the bank holds; a limit keeps a coreset of the patches (default: every patch) |
dataFile | string | Training data file (default: data.train in mloop.yaml, else datasets/train.csv; with additionalDataFiles and no dataFile, datasets/train.csv) |
dropMissingLabels | boolean | Drop rows with missing label values before training |
encoder | string | image-anomaly: the installed image encoder the pictures are embedded with (default: the only one installed — see mloop_encoder) |
ensemble | boolean | Answer with a weighted blend of the search's best trials when it scores better out of fold (binary classification and regression; another task refuses it). A blend is one model file several times larg… |
epochs | integer | Epochs a deep-learning task trains for (default 10): text classification, sentence similarity, NER, question answering, object detection. `time` does not shorten such a fit, so this is its one dial on… |
generateScript | string | Write a preprocessing script from the data check to this path. With analyzeData the run stops there (the answer carries `script`); without it, it goes on to train |
groupColumn | string | Ranking: the column that groups rows into query contexts |
itemColumn | string | Recommendation: the column of what was rated (overrides item_column in mloop.yaml) |
label | string | Label column name |
maxRows | integer | Most training rows; more are sampled |
maxTrials | integer | Stop the trainer search after this many trials, within time — the same search on a fast machine and a slow one. Tasks that run no search (clustering, anomaly detection, recommendation, forecasting,… |
metric | string | Optimization metric |
modelName | string | Model name (default: "default") |
noPromote | boolean | Skip automatic promotion to production |
portable | boolean | Train only with steps ONNX can express, so mloop_export_onnx can export the model |
records | string | For a JSON data file: the dotted path to the array whose items are the rows |
samplingStrategy | string | How rows are sampled when maxRows applies (default: by task) |
seed | integer | Random seed for the sampling (default: 42) |
task | string | ML task type (default: the project's, from mloop.yaml) |
testSplit | number | Test data split ratio (0.0-1.0, default: 0.2) |
time | number | Training time in seconds |
userColumn | string | Recommendation: the column of who rated (overrides user_column in mloop.yaml) |
weight | string | Column that weights the rows (e.g. 1/π for sampled labels); never a feature |
mloop_predict
Run predictions using a trained model. Uses production model by default; `experimentId` predicts with that experiment instead (a shadow prediction — production does not move). The JSON names the model that answered in `experimentId`.
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Path to MLoop project directory |
dataFile | string | Prediction data file (default: data.predict in mloop.yaml, else datasets/predict.csv) |
experimentId | string | Predict with this experiment (e.g. a staging candidate) instead of production — production does not move |
includeFeatures | boolean | Whether the output file repeats the input feature columns (the CLI default is yes; false leaves them out) |
log | boolean | Log the predictions; without an output file each returned row carries the predictionId that feedback takes |
model | string | Path to a model file to predict with instead of the production model |
modelName | string | Model name |
output | string | Output file path |
records | string | For a JSON data file: the dotted path to the array whose items are the rows |
scoreThreshold | number | Object detection only: report boxes with at least this confidence (default 0.5). A detector trained by MLoop since the ranked metrics keeps every box down to 0.05, so 0.3 (then lower) shows what a not… |
unknownStrategy | string | Strategy for handling unknown categorical values in prediction data |
mloop_list
List all experiments and their metrics for a model.
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Path to MLoop project directory |
modelName | string | Filter by model name |
showAll | boolean | Include failed experiments |
trials | string | An experiment ID: show its trial leaderboard (every candidate the search tried, e.g. a clustering run's K = 2..10) instead of the experiment overview |
mloop_promote
Promote an experiment to production. Select by explicit ID, or auto-select with latest (newest completed) / best (best metric, direction-aware). The promoted model will be used for predictions. With history, lists every change of production instead — experiment, what it replaced, action (promote / auto-promote / rollback), the quality gate outcome (passed / forced / not-applied) and the metric value (mloop >= 0.39). Promoting by explicit ID still promotes a model that does not beat the production it replaces; the result then carries notBetterThanProduction (the reason and both scores) — re…
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Path to MLoop project directory |
best | boolean | Promote the completed experiment with the best metric (direction-aware) |
by | string | Who is changing production — a name or an account, recorded in the promotion history (nothing is recorded when it is not given) |
decideOnly | boolean | Report which experiment latest/best would promote, and move nothing — the production model stays as it is |
experimentId | string | Experiment ID to promote (e.g., exp-003); omit when using latest/best |
force | boolean | Skip confirmation, and promote a model the quality gate refuses |
history | boolean | List every change of production instead of promoting (mloop >= 0.39) |
latest | boolean | Promote the most recent completed experiment |
modelName | string | Model name |
mloop_rollback
Return production to the experiment it held before the current one (from the promotion history), backing up the current production first. With "to", return to a named experiment that has been production before; an experiment that never served is refused — use mloop_promote for that.
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Path to MLoop project directory |
by | string | Who is changing production — a name or an account, recorded in the promotion history (nothing is recorded when it is not given) |
modelName | string | Model name |
to | string | Experiment to return to; it must have been in production before (default: the one the current production replaced) |
mloop_threshold
A binary classifier's decision threshold, as JSON. With precision and dataFile, chooses the probability threshold at which the precision of the positive class — or of precisionOf, the negative one included (mloop >= 0.40) — reaches the target on those labeled rows, keeping the most of that class's recall, and writes it beside the model — predict, serve, evaluate and the gate then answer at it, and promote carries it. With guarantee (a risk such as 0.05, mloop >= 0.48) the threshold is the lowest one whose precision is certified, not merely observed on the file — the usual choice is the…
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Path to MLoop project directory |
clear | boolean | Remove the threshold: the model answers at 0.5 again |
dataFile | string | Labeled evaluation file the threshold is chosen on (required with precision) |
experimentId | string | Experiment to set the threshold of (default: the production model) |
guarantee | number | Risk δ, above 0 and below 1 (e.g. 0.05), with precision: choose the lowest threshold whose precision is certified to reach the target — wrong in at most δ of the files it could be run on — or re… |
modelName | string | Model name |
precision | number | Target positive precision (above 0, at most 1): the lowest threshold reaching it on dataFile is chosen |
precisionOf | string | The class whose precision is targeted, by its label value (default: the positive class) — the negative class too, when a wrong "no" is the costly answer |
records | string | For a JSON dataFile: the dotted path to the array whose items are the rows |
weight | string | Column that weights the rows |
mloop_calibrate
A classifier's probability calibration, as JSON. With dataFile, fits a map from the model's own probability to how often it is right on those labeled rows (binary: platt or isotonic; multiclass: temperature, answers unchanged; weighted rows allowed) and writes it beside the model without retraining — predict, serve, evaluate (its ECE) and a threshold chosen afterwards then read calibrated probabilities, and promote carries it. Reports ECE before and after on the fit rows (in-sample). Refused while the model has a decision threshold (clear it, calibrate, choose it again). Without dataFile, sh…
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Path to MLoop project directory |
clear | boolean | Remove the calibration: the model answers with its own probabilities again |
dataFile | string | Labeled rows the calibration is fit on — rows the model was not trained on |
experimentId | string | Experiment to calibrate (default: the production model) |
method | string | Binary: platt (default; steady on a few hundred rows) or isotonic (no shape assumed, needs more rows). Multiclass: temperature (default; answers unchanged) |
modelName | string | Model name |
records | string | For a JSON dataFile: the dotted path to the array whose items are the rows |
weight | string | Column that weights the rows (1/π for a recheck sample) |
mloop_export_onnx
Write a trained model (binary, multiclass or regression) as an ONNX graph plus a manifest (model.onnx.json) naming each graph input and the data columns behind it, the outputs, the classes, the metrics and SHA-256 hashes — for runtimes without ML.NET. A model that featurizes a free-text column with the ML.NET text featurizer is refused with the columns named — train it with `portable: true` (mloop_train) to export it; a category column exports as is.
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Path to MLoop project directory |
annotations | object | Opaque text pairs written into the manifest's `annotations` (at most 32; keys up to 64 and values up to 1,024 characters) — for example the version of the preprocessing that feeds the graph. mloop d… |
dataFile | string | A data file with the model's input columns (default: the experiment's training file) |
experimentId | string | Experiment to export (default: the production model) |
modelName | string | Model name |
outputDir | string | Directory for model.onnx and model.onnx.json (default: the experiment's directory) |
verify | boolean | Run the graph in ONNX Runtime and compare it with the model; a graph that disagrees is not kept |
mloop_info
Analyze and profile a dataset. Shows column types, statistics, missing values, and more. Can read label column from mloop.yaml configuration.
| Parameter | Type | Description |
|---|---|---|
dataFile * | string | Path to data file to analyze |
analyze | boolean | Enable deep analysis including correlation, feature importance, distribution, and anomaly detection |
label | string | Label column name (overrides mloop.yaml setting) |
modelName | string | Model name to read label configuration from mloop.yaml (default: "default") |
projectPath | string | MLoop project path (optional, for relative paths) |
records | string | For a JSON data file: the dotted path to the array whose items are the rows |
sampleSize | number | Maximum number of rows to sample for deep analysis (default: 50000) |
mloop_status
Show MLoop project status including models, experiments, and production deployments.
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Path to MLoop project directory |
verbose | boolean | Detailed status: more than the overview of each model |
mloop_compare
Compare metrics across multiple experiments to identify the best performing model.
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Path to MLoop project directory |
best | integer | Compare only the top N experiments by metric (without experiments) |
experiments | array | Experiment IDs to compare (at least 2; leave out to compare the model's completed experiments) |
metric | string | Rank by this metric instead of the one the model was trained to optimize |
metricsFile | string | Rank candidates from a JSON file of metrics, with no MLoop project needed (an external system of record's candidates): [{"id": ..., "metrics": {...}}, ...] |
modelName | string | Model name |
mloop_evaluate
Evaluate a model's performance on test data, as JSON: test metrics beside the training metrics, per slice with sliceBy, weighted with weight. For a classifier, confusion: classes and counts[actual][predicted] (weighted sums under weight; per slice too) — read any class-set rate from it, e.g. the share of a must-catch class answered as a harmless one (mloop >= 0.39). With against (an experiment id or "production"), the other model is scored on the same rows and weights and the two are compared row by row: comparison.metrics, and comparison.paired — the per-row loss (error_rate for a classif…
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Path to MLoop project directory |
against | string | Also evaluate this experiment id (or "production") on the same rows and weights, and compare the two row by row (mloop >= 0.39) |
dataFile | string | Test data file for evaluation (default: data.test in mloop.yaml, else datasets/test.csv) |
experimentId | string | Specific experiment to evaluate |
modelName | string | Model name |
normalClass | string | image-anomaly: the subfolder of the test folder that holds the normal pictures (default: normal, good or ok); every other subfolder is anomalous (mloop >= 0.47) |
records | string | For a JSON test file: the dotted path to the array whose items are the rows |
sliceBy | string | Also report the metrics for each value of this column of the test data |
weight | string | Column that weights the test rows (defaults to the experiment's training weight when the file has it) |
mloop_serve
Start the MLoop REST API server for serving predictions via HTTP. Returns once the server answers /health, with its URL, process id, log file and the command that stops it; the server keeps running after the call.
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Path to MLoop project directory |
host | string | Host to bind to |
port | number | Port number (default: 5000) |
mloop_init
Initialize a new MLoop project. Creates mloop.yaml, datasets/, models/ directories.
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Path to create/initialize the MLoop project |
task * | string | ML task type for this project |
label | string | Label column name (can be set later in mloop.yaml; default: "Label") |
modelName | string | Name of the first model (default: "default") |
mloop_validate
Validate the mloop.yaml configuration file. Checks for syntax errors, missing fields, and invalid values.
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Path to MLoop project directory |
verbose | boolean | Detailed validation results |
mloop_prep
Run a model's preprocessing pipeline — the prep steps declared under the model in mloop.yaml (see mloop_prep_plan) — over a CSV file, writing the prepared file.
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Path to MLoop project directory |
dryRun | boolean | Show the pipeline steps without executing them |
input | string | Input CSV file (default: data.train in mloop.yaml, else datasets/train.csv) |
modelName | string | Model whose prep steps (mloop.yaml) to run (default: 'default') |
output | string | Output CSV file (default: <input>_prep.csv) |
mloop_logs
View prediction logs for a model. Shows recent predictions with timestamps and results.
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Path to MLoop project directory |
from | string | Only entries from this day on (yyyy-MM-dd) |
limit | number | Maximum number of log entries to show |
modelName | string | Model name (default: "default") |
to | string | Only entries up to this day (yyyy-MM-dd) |
mloop_feedback
Manage feedback for model predictions. Add the actual value for a logged prediction (with its source and an optional weight) — or for many at once from a table with one row per prediction (`file`; rows that cannot be recorded are listed by row number, the others are recorded), list existing feedback, or view feedback metrics (accuracy is weighted when feedback carries weights).
| Parameter | Type | Description |
|---|---|---|
action * | string | Feedback action to perform |
projectPath * | string | Path to MLoop project directory |
actualColumn | string | With file: the column holding the actual value (default "actual") |
experiment | string | For "metrics": whose answers the metrics are of — an experiment id, or "all" for every experiment's. Default: the experiment in production, the answers `mloop_trigger` judges; with nothing promoted,… |
file | string | For "add": a table (CSV, TSV, workbook, …) with one row per prediction — its prediction id and the actual value in columns — to record many at once instead of predictionId and value. Rows that c… |
from | string | Only entries from this day on (yyyy-MM-dd; for "list" and "metrics") |
idColumn | string | With file: the column holding the prediction id (default "prediction_id") |
limit | integer | Maximum number of entries to show (for "list"; default 20) |
modelName | string | Model name for "list" and "metrics" (default: "default") |
predictionId | string | Prediction ID to add feedback for ("add" takes this and value, or file) |
source | string | Where the value came from, e.g. "human", "reviewer-llm" (for "add"; with file, for the rows whose source cell is empty) |
sourceColumn | string | With file: the column holding where each value came from (default "source", read when the file has it) |
to | string | Only entries up to this day (yyyy-MM-dd; for "list" and "metrics") |
value | string | The actual (ground-truth) value ("add" takes this and predictionId, or file) |
weight | number | How much this row counts in training and evaluation built from feedback — for a row reviewed with probability p, 1/p (for "add"; default 1; with file, for the rows whose weight cell is empty) |
weightColumn | string | With file: the column holding each row's weight (default "weight", read when the file has it) |
mloop_sample
Create a sampled dataset — from a model's logged predictions and feedback (a retraining dataset: feedback under the model's label, with a weight column when feedback carries weights) or from a data file (CSV, TSV, JSON, Excel, Parquet; written as CSV) — or view sampling statistics.
| Parameter | Type | Description |
|---|---|---|
action * | string | Sample action to perform |
projectPath * | string | Path to MLoop project directory |
dataFile | string | Data file to sample from instead of prediction logs — CSV, TSV, JSON, Excel or Parquet; the sample is written as CSV ("create" only) |
label | string | Label column for stratified CSV sampling |
modelName | string | Model whose logged predictions and feedback to sample ("create": a retraining dataset — the feedback under the model's label, weighted when feedback carries weights; "stats": default "default") |
output | string | Output CSV path |
records | string | For a JSON data file: the dotted path to the array whose items are the rows ("create" only) |
size | integer | Number of rows to sample (default 1000) |
strategy | string | Sampling strategy — logs: random, recent, feedback-priority, stratified, low-confidence; CSV: random, head, stratified |
mloop_trigger
Check whether retraining is due, as JSON: each default condition — feedback accuracy (the production experiment's own answers, met once the drop is established: at least 30 rows of feedback and the 95% interval's upper end below the threshold), feedback volume, time since training and input drift (PSI of the production model's logged inputs against its training data, met at 0.25) — with its threshold, current value, whether it is met and why; the drift condition carries every column's PSI under drift. A condition that could not be measured says so in details.
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Path to MLoop project directory |
accuracy | number | Accuracy threshold (0.0-1.0): the accuracy condition is met when feedback accuracy drops below it (default: the project's) |
feedback | integer | Feedback volume threshold: the volume condition is met once this many feedback rows have come in (default: the project's) |
modelName | string | Model name (default: "default") |
mloop_drift
How far the production model's recent inputs (its own logged predictions) have moved from the data it was trained on, as JSON: status (Measured, NoProduction, NoProfile, TooFewRows), and per column the population stability index (PSI — under 0.1 stable, 0.1–0.25 moderate, 0.25+ significant), its level and the bin that moved most with its training and current share; plus, under drift.prediction, the same measure for the model's own answers against its answers at training (predicted class, or predicted value by decile; null when the model has no answer profile — mloop >= 0.39). A free-text…
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Path to MLoop project directory |
modelName | string | Model name (default: "default") |
rows | integer | How many of the most recent logged predictions to compare (default 5000, at least 100) |
sliceBy | string | Also report drift per value of this input column (values with 100+ predictions) |
mloop_analyze
Run a single, read-only exploratory-data-analysis (EDA) aspect on a dataset and return a structured JSON envelope for feature-engineering decisions. Aspects: profile, correlation, importance (needs a label), outliers, distribution, series (a column as an ordered series). Never mutates the data file or mloop.yaml.
| Parameter | Type | Description |
|---|---|---|
aspect * | string | EDA aspect to compute: "profile" (column types, null %, cardinality, constant columns), "correlation" (high-correlation pairs + multicollinearity), "importance" (feature-importance ranking, requires a… |
aroundTrend | boolean | Test stationarity around a linear trend instead of a constant level (only "series") |
column | string | Series column to analyze (only the "series" aspect; optional when the CSV has a single column) |
dataFile | string | Path to the CSV dataset to analyze. Optional: when omitted, defaults to the project's configured train data (data.train in mloop.yaml, else datasets/train.csv). Pass projectPath so the default can be… |
label | string | Label/target column name (overrides mloop.yaml; required for the "importance" aspect) |
maxLag | integer | Largest lag of the autocorrelation functions (only "series"; default min(10*log10 n, n - 1)) |
modelName | string | Model name to read label configuration from mloop.yaml (default: "default") |
projectPath | string | MLoop project path (for resolving relative paths and the default data file) |
records | string | For a JSON data file: the dotted path to the array whose items are the rows |
mloop_detect
One-shot time-series anomaly detection over an entire CSV series (spectral residual, no training, no MLoop project required). Every point returns an anomaly verdict (isAnomaly), its score, an expectedValue and control limits (controlLower/controlUpper — the chartable band normal points lie inside); nearEdge marks points too close to the end of the series to judge as surely. Use this instead of train+predict when analyzing a whole series once.
| Parameter | Type | Description |
|---|---|---|
dataPath * | string | Path to the CSV file containing the time series |
column | string | Value column to monitor (auto-selected when the CSV has a single column) |
output | string | Also write the full per-point result to this CSV file |
records | string | For a JSON data file: the dotted path to the array whose items are the rows |
sensitivity | number | Coverage of the control limits in percent (0-100, exclusive; 99.73 = 3 sigma; default 99.73) |
threshold | number | Score above which a point is an anomaly (> 0; the score is a point's saliency relative to the points before it; default 3) |
mloop_prep_plan
Declare a preprocessing step in mloop.yaml (policy only — never changes data). Add/replace with set='type[:method]' (+ optional columns), remove with remove='type', or omit both to list the current plan. Returns a JSON envelope where each step reports its leakage category (preFeaturizer/csvStage/unsupportedLeakageWarn) and fold-safety. Statistical fit happens fold-internally at train time.
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Path to the MLoop project directory |
columns | string | Comma-separated target columns for the --set/--remove step (e.g. "a,b") |
list | boolean | List the current prep steps |
modelName | string | Model name in mloop.yaml (default: "default") |
remove | string | Remove prep step(s) of this type |
set | string | Add/replace a prep step: "type[:method]" (e.g. "normalize:z-score", "drop-duplicates") |
mloop_features_select
Declare which columns are features in mloop.yaml (policy only — never changes data). Exclude columns with drop='a,b', keep only certain columns with keep='a,b' (all others excluded, label always kept), or clear all exclusions with reset=true. Returns a JSON envelope listing the excluded (ignored) columns.
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Path to the MLoop project directory |
drop | string | Comma-separated columns to exclude from features (e.g. "id,ts") |
keep | string | Comma-separated columns to keep; all other columns are excluded (label always kept) |
modelName | string | Model name in mloop.yaml (default: "default") |
reset | boolean | Remove all "ignore" overrides (clears feature exclusions) |
mloop_token
Issue a JWT bearer token for a server started with mloop_serve: every endpoint but /health requires one, sent as the returned Authorization header. Signed with the development key unless key is given; role admin for the write endpoints.
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Path to MLoop project directory |
expiresHours | number | Token lifetime in hours (default: 24) |
key | string | The server's signing key (Jwt:Key), when it is not the development key — at least 32 characters |
role | string | admin for the write endpoints (POST /promote, /rollback, /train, /evaluate, /samples, cache); omit for predict and reads |
subject | string | Who the token identifies (the sub claim); the request limit counts per subject (default: mloop-cli) |
mloop_embed
Turn images or texts into L2-normalised vectors with a pretrained encoder (mloop_encoder installs one), with the encoder's identity — id, sha256, preprocessor — so vectors from different encoders or versions are never compared. Texts need mloop 0.46.0 or later.
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Working directory the paths are relative to (an MLoop project is not required) |
encoder | string | The encoder to use (mloop_encoder list); may be left out when only one of the kind is installed |
images | array | Image files (PNG, JPEG, …) to embed, at most 64 |
patches | boolean | Also one vector per patch of each image, on the encoder's grid (images only, at most 8) |
textFile | string | A UTF-8 file of texts to embed, one per line (at most 256 together with texts) — instead of images |
texts | array | Texts to embed with a text encoder, at most 256 — instead of images |
mloop_encoder
Manage the pretrained encoders mloop_embed and encoder-read text columns run: list the installed ones, install a catalog encoder (its weights are downloaded and checked against a pinned SHA-256 — dinov2-small ~88 MB, multilingual-minilm ~470 MB), add one of your own from its definition file and ONNX graph (and tokenizer, for a text encoder), or remove one.
| Parameter | Type | Description |
|---|---|---|
action * | string | list the installed encoders, install one from the catalog, add one of your own from its files, or remove one |
projectPath * | string | Working directory (encoders are kept per user, not per project) |
definition | string | add: the encoder's definition file (encoder.json) |
encoder | string | The encoder id — for install, a catalog id (dinov2-small for images, multilingual-minilm for text); for remove, an installed one |
model | string | add: the encoder's ONNX graph |
tokenizer | string | add, a text encoder: its tokenizer model (SentencePiece .model) |
mloop_explain
Which input columns a trained model relies on, as JSON: permutation importance on a labeled file, in the metric mloop_evaluate reports — each column is shuffled `repeats` times and the importance is the mean drop (± the spread), at most `rows` rows, seeded so the same seed gives the same numbers. A column the model did not read is listed as not shuffled. It is reliance, not cause: correlated columns share it. Defaults to the production model and datasets/test.csv (needs an mloop newer than 0.48).
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Path to MLoop project directory |
dataFile | string | Labeled file the model is scored on, with the label column (default: data.test in mloop.yaml, else datasets/test.csv) |
experimentId | string | Experiment to explain (default: the production model) |
modelName | string | Model name (default: "default") |
records | string | For a JSON data file: the dotted path to the array whose items are the rows |
repeats | integer | Shuffles per column; the importance is their mean (default 3) |
rows | integer | Most rows scored; a larger file is sampled — every column costs repeats scorings (default 2000) |
seed | integer | Seed of the sample and the shuffles: the same seed gives the same numbers (default 1) |
weight | string | Column that weights the rows (defaults as mloop_evaluate does) |
mloop_runtime
Manage the deep-learning runtimes mloop downloads on demand: list them with their install state, install one (tf for image classification, torch for text tasks, onnxruntime for the ONNX export check and image encoders — a large download), or remove it. A task whose runtime is missing refuses to train and names the runtime to install.
| Parameter | Type | Description |
|---|---|---|
action * | string | list the runtimes and whether each is installed, install one, or remove an installed one |
projectPath * | string | Working directory (runtimes are kept per user, not per project) |
runtime | string | The runtime to install or remove: tf (image classification), torch (text tasks), onnxruntime (ONNX export check, image encoders) |
mloop_docker
Generate the Docker configuration that serves a project's model with `mloop serve` (a Dockerfile and a docker-compose.yml, whose compose service mounts the project's models read-only and needs a JWT_SIGNING_KEY of 32+ characters to start) into the project directory. Files already there are overwritten. Answers the console text: this command has no JSON output.
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Path to MLoop project directory (the files are written here) |
modelName | string | Model to containerize (default: "default") |
port | integer | Port the API is exposed on (default 5000) |
mloop_quick_start
One-step project setup: initialize -> train -> auto-promote. Provide data file, label, and task type to go from zero to production model.
| Parameter | Type | Description |
|---|---|---|
dataFile * | string | Training data: a CSV (or other table) file, or for the image tasks a folder of pictures |
projectPath * | string | Project directory path |
task * | string | ML task type |
label | string | Label column name (omit for tasks that learn without one: clustering, anomaly-detection, image-anomaly, ...) |
time | number | Training time in seconds (omit for auto-time) |
mloop_auto_train
Automated training pipeline: profile data -> train (with auto-time) -> list experiments. Handles the full training workflow in a single call.
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Project directory path |
dataFile | string | Training data file (default: data.train in mloop.yaml, else datasets/train.csv) |
label | string | Label column (uses mloop.yaml default if omitted) |
modelName | string | Model name (default: "default") |
time | number | Training time (omit for auto-time) |
mloop_project_overview
Get a comprehensive overview of the MLoop project: status, all experiments, and production model metrics in a single call.
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Project directory path |
modelName | string | Model name (default: "default") |