Quickstart: your first model

Train, compare and deploy a classification model on a sample dataset in about ten minutes.

In this quickstart you build a model that predicts which employees are likely to leave a company, a stand-in for customer churn. You will start from a ready-made use case, train three algorithms, read the leaderboard, deploy the best model as an endpoint and send it a prediction. No code is needed until the optional last section.

The use case uses the bundled employee sample: 14,999 rows, one row per employee, and a left column that is 1 when the person left. Predicting left from the other columns is a binary classification task.

Before you start

  • An account. mlflow accounts are created by an administrator; there is no public sign-up unless your server enables it. If you were not sent an invitation, ask the person who runs mlflow for your organisation.
  • A workspace you can edit. You need a role that can create projects. Read-only roles (viewer, service account) cannot train or deploy; see Roles and permissions.
  • About ten minutes. Most of it is training time.

Build and deploy the model

Sign in

Open app.mlflow.es (or the address of your own server) and fill in Email and Password, then select Sign in.

After signing in, mlflow takes you back to the last project you worked on. The first time, you land on your workspace's Projects page, or on the list of workspaces if you belong to more than one.

Open a workspace

If you see Workspaces, select the workspace to use. If the list is empty, select Create your first workspace, type a Name, select Create workspace and then select the new workspace's card.

Start from the Churn prediction use case

On the workspace's Projects page, select Start from a use case. The Use cases gallery lists ready-made templates; each card shows its task, sample dataset, target and algorithms.

Find Churn prediction and select Use this template. mlflow creates a project, adds the employee sample dataset to the workspace and opens the new pipeline in Pipeline Studio.

Using the same template again does not overwrite anything: it creates a second copy named "Churn prediction (2)".

Look at the pipeline

The editor opens on the Columns part. A strip shows the dataset (the employee sample, with its row and column count), and the table below has one row per column with the transformations chosen for it as chips:

  • department and salary have One-hot.
  • Five numeric columns have Standardise.

Steps in order lists the two steps in the order they run. Press a chip or a step to see its columns, its settings and Before and after. Open Review & run and select Check without running; a valid pipeline reports "All good" with how many columns reach the models.

The steps become part of the model's pipeline: they are fitted on training rows only, and the same transformations are applied to every row the model scores later, including the rows you send to the endpoint.

The Columns part of Pipeline Studio: the dataset strip, the filter chips, and one row per column with its transformations as chips

Choose the algorithms and train

Open the Models part ("Which models to try"). The template has already selected three algorithms: logistic regression, random forest and gradient boosting. Each one is in Automatic mode, so it trains with sensible defaults; you can switch any of them to Manual later.

Under Cross-validation, the defaults are fine for this dataset: 10 CV folds and the Stratified k-fold strategy, which keeps the share of leavers the same in every fold.

Open Review & run and select Train 3 models. A training panel shows which algorithm is running ("Algorithm 1 of 3") and an estimate of the time left. You can select Run in background and come back later from the project's Runs page.

Read the leaderboard

When training finishes, mlflow opens the run on the Leaderboard tab.

  • The Best model card shows the winning algorithm, its main metrics, its training time and its size.
  • The All models table has one row per model and one column per metric (for classification: Accuracy, AUC, Recall, F1 and others). The caption says which metric the table is ranked by; select any column header to sort by it instead.

The scores are cross-validation averages: each model was trained 10 times, each time scored on the fold it did not see.

A model that is only slightly better on one metric is not necessarily better. Select two rows and choose Compare to see them side by side, or open a model with View details to look at its plots.

Deploy the best model

Select Deploy best model in the run header. In the dialog, open the Deploy anywhere tab and select Deploy on mlflow.

The best model is still a model candidate of this run, so mlflow first asks to promote it: select Promote and continue. This registers the model as a new version in the model registry.

In the deploy dialog:

  • Endpoint slug: the name in the endpoint URL. Use lowercase letters, digits and dashes, 3 to 64 characters, for example churn-quickstart.
  • Auth mode (under Access control): keep Workspace (member token), so only members of this workspace can call the endpoint.

Select Deploy. mlflow opens the new deployment's page.

Send a test prediction

On the deployment page, open the Test tab. The Rows (JSON array) box is already filled with a sample row from the training data, using the model's input columns. Change a value if you like, for example a lower satisfaction_level, and select Send request.

The Response table shows the Prediction (1 means the model expects the employee to leave) and one probability column per class.

Call the endpoint from code

Every deployment is a REST endpoint at POST /api/v1/deployments/<slug>/predict. To call it from a script you need an API key; create one under Account > API keys (see API keys and scopes). A key with the predict scope is enough.

The body is a JSON object with a rows list; each row maps column names to values. The target column (left) is not needed.

bash
export MLFLOW_API_KEY=pck_...
curl -s -X POST "https://app.mlflow.es/api/v1/deployments/churn-quickstart/predict" \
  -H "X-API-Key: $MLFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rows": [{"satisfaction_level": 0.38, "last_evaluation": 0.53, "number_project": 2,
                "average_montly_hours": 157, "time_spend_company": 3, "Work_accident": 0,
                "promotion_last_5years": 0, "department": "sales", "salary": "low"}]}'

The response lists one prediction per row, with class probabilities when the model provides them:

json
{
  "deployment_id": "...",
  "endpoint_slug": "churn-quickstart",
  "predictions": [{ "index": 0, "prediction": 1, "probabilities": { "0": 0.08, "1": 0.92 } }],
  "latency_ms": 12.4,
  "request_id": "..."
}

The numbers above are illustrative; your model's output will differ.

What you built

You followed the whole workflow that the project Overview tracks: Data, Pipeline, Train, Results, Deploy and Monitor. The last step happens on its own: open the deployment's Monitor tab after it has received some predictions to see drift reports.

Next steps

Learn the theory

Lessons on learning.mlflow.es that explain the ideas behind this page.

Updated 2026-11-21