Skip to content

Data & analytics

ML Models

Train a model on a lakehouse table without writing code, keep every version with its metrics and the snapshot it learned from, score rows back into the lakehouse, let agents predict with it, and draw its forecasts on a dashboard — all on your own infrastructure.

What it is#

  • RegistryData & BI → ML Models: every model you own or were granted, its production version's headline metric, what it predicts from, and whether something is training right now.
  • Training — a four-step wizard drives a batch sandbox of the notebook runtime that profiles the table, tries several algorithms under a time budget and keeps the best one with its metrics, leaderboard and feature importance.
  • Versions and stages — each run is a version: candidate, staging, production or archived. The first successful version is promoted automatically; later ones by hand. Production is exclusive per model and is what agents and dashboards use.
  • Predictions — a try-it form for one row, a batch run that scores a whole lakehouse table into a new table you own, and the ml_predict tool for agents.
  • Forecasting — time-series models whose projected periods a BI line chart can draw and a forecast-basis alert can watch.

A model is governed like every other resource: owner-only, shareable read-only through IAM, audited by a database trigger, and every training run and prediction run carries a decision id and a passport.

In this guide#

The guide is five pages, in the order a model is made and used. The rest of this page is the overview: the tasks the trainer knows, worked use cases, and where the platform stands against the managed services.

Tasks#

TaskWhat it needsCandidates triedPrimary metric
Classificationcategory, boolean, small domainlogistic regression, random forest, histogram gradient boosting, LightGBMF1 (macro)
Regressionnumberridge, random forest, histogram gradient boosting, LightGBMRMSE
Forecastnumber over a date column, a periodlast value, moving average, seasonal naive, Holt-Winters, gradient boosting on lag featuresRMSE
Clusteringfeature columns onlyk-means for two to ten groups (or a fixed k), kept by silhouetteSilhouette
Anomaly detectionfeature columns onlyisolation forest (200 trees); 2% flagged unless a share is givenAnomaly rate
Recommendationa user column, an item column, optional strengthitem-item cosine similarity on the interaction matrix; popularity for cold startsHit rate @10

The first three predict a chosen column. Clustering and anomaly detection have no target: they describe the rows from the selected features and report a profile of every group or a score per row. Recommendation learns from interactions — one row per user and item, optionally weighted by a rating, a quantity or an amount — and is scored on a held-out interaction per user. Free-text columns (average length twenty characters or more) become TF-IDF features for every task instead of being dropped; clustering and anomaly detection compress them to twenty dense components so a text column cannot swamp the numbers.

The wizard suggests a task from a real profile of the table (SUMMARIZE plus a sample). A float column is never mistaken for an identifier because its values are unique; an integer column named like an id is; a constant column cannot be a target at all.

Use cases#

Which plan will a customer end up on?#

  1. 1

    Train a classification with plan as the target

    Identifiers are off by default and the constant status column cannot be chosen. Read the confusion matrix and the importance chart.
  2. 2

    Score the table in a batch run and hand the output table to an agent

    Which customers are predicted to move to enterprise? is now a query over your own lakehouse table.

How much is this order worth?#

  1. 1

    Train a regression on net_usd with a two-minute budget

    Four candidates are tried and the best kept.
  2. 2

    If the holdout error is high, prepare the data

    Add a row filter or a custom SELECT with derived columns, and train a new version with a quick tuning search.
  3. 3

    Enable ML Predictions on an agent

    Ask it to estimate an order it describes; the tool reads the feature columns from ml_list_models.

Next quarter's revenue, on the dashboard#

  1. 1

    Train a forecast on the dated totals, twelve periods ahead

  2. 2

    Attach it to a line chart as the forecast Source

    The chart draws the projection and its band.
  3. 3

    Add an alert with the forecast basis

    Projected total for the next three periods below target → notification, re-evaluated at every scheduled refresh.

How this compares#

Where AgentSwarms stands against Databricks ML and SageMaker, honestly:

CapabilityAgentSwarmsDatabricks / SageMaker
No-code AutoMLSix tasks incl. clustering, anomaly, recommendation; tuning; data prep in the wizardAutoML / Canvas: similar tasks, larger search spaces
Registry, stages, lineageVersions, stages, snapshot + decision id per version, artifact digestsMLflow registry / Model Registry
Batch scoringInto lakehouse tables, scheduled, with drift per runJobs / Batch Transform
Real-time inferenceWarm endpoints hold the served version in memory: 45 ms of scoring instead of a ~25 s container start; several copies per endpoint, scaled on measured load, plus a candidate's copy while one is being triedServing endpoints with autoscaling
Serving at scaleSeveral copies per endpoint, added on measured request rate and removed only when idle and clear of the line; on Kubernetes each copy is a Pod the scheduler may place anywhere. Shadow traffic (mirrored, compared, never served) and canary traffic (a share of real requests answered by the candidate, rolled back automatically when it fails worse than production)Autoscaling across hosts, canary and shadow traffic
Drift monitoringPSI per feature on every batch, threshold alertsLakehouse Monitoring / Model Monitor (more statistics)
Ground-truth monitoringOutcome source per model; the training metric recomputed on matched rows, with coverage; decay alerts on the platform clockModel-quality monitoring jobs
Model selectionCandidates scored by cross-validation inside the training rows; the holdout is read once, for reporting. Fold spread on every version; TimeSeriesSplit for ordered dataCross-validation in AutoML / Autopilot
Calibration and thresholdsReliability curve and Brier/ECE per version; calibration kept only when both improve; measured threshold sweep, set per version without retrainingCalibration in SageMaker Clarify; thresholds set in application code
Reason codes in batchTop-3 drivers and their effects as columns on the scored table, the same ablation as the single-row explanation; refused above a row ceiling rather than truncatedClarify batch explainability jobs
ExplainabilityGlobal permutation importance at training, plus per-row contributions by ablation against a typical row. Not Shapley valuesSHAP per prediction, Clarify
FairnessSelection-rate ratio and error-rate gaps per group, per column; assistant suggests columns and proxies; four-fifths defaultClarify / bias reports
Promotion approvalNamed approvers per model, in the same inbox as swarm approvals; a requester can never approve their ownApproval workflows
Scheduled retrainingCron/cadence, promote-when-better, one platform clockWorkflows / Pipelines
Public APIPer-model scoped keys, rate limits, audited denials, BYO registrationYes, IAM-based
Bring your own modelAny joblib pipeline under a small contractAny framework, containers
Feature storeFeature views: score by key, read from the table training read, with an online store serving the latest row per key in ~2 msYes
Distributed / GPU trainingThe algorithm search spreads across several sandboxes, and a dataset too large for one container is refit across several — disjoint hashed slices, averaged into one model, instead of a sample; GPUs requestableClusters, distributed frameworks, GPU instances
Experiment trackingRuns logged from a notebook or a script with params, metrics and curves; a run promotes into the registryMLflow / Experiments
Model cardsGenerated from the registrySageMaker Model Cards
GovernanceIAM shares, trigger audit, decision ids, result digests, one statement guard for all dataUnity Catalog / IAM
Agents and BIModels are agent tools; forecasts and drift live in the BI layerSeparate products
Cost and residencySelf-hosted, your infrastructure, no per-call chargesManaged, metered

Everything in the left column is shipped and tested. What is left: growing the cluster itself. On Kubernetes copies already spread across nodes — each is a pod, placed by the scheduler — and a copy that cannot be placed now says so rather than timing out. What the platform does not do is add a node: that is a cluster autoscaler's job, and it acts on exactly the pending pod this produces. On Docker every copy is a container on one host by design; spreading them further means running an orchestrator, which is what the Kubernetes deployment is.