Models and MLflow
Groundzero uses MLflow to track machine learning experiments and manage models. After this chapter you can log a model from a notebook, look at your experiments and runs, share a model with other projects, and use a model in a job or dataset.
Notebook sessions are already set up to record to MLflow for your site. A model you train and log with MLflow shows up on the project's Models tab.
| Use models when | Notes |
|---|---|
| You train models in notebooks or jobs and want to compare runs | Log runs with MLflow in your code |
| Another team's trained model should be reused | Import the published model |
| A job or dataset should score data with a model | Pick the model under Models in the job or dataset editor |
You need a project, and models logged by you or shared with you. The list shows the models you may see. You also need a compute size to open the MLflow screen. Groundzero uses the smallest one for that.
Log a model from a notebook#
Inside a notebook, log with the MLflow library as you would anywhere. Nothing needs configuring. After the run finishes, the model is listed on the Models tab.
import mlflow
import mlflow.sklearn
from sklearn.ensemble import RandomForestClassifier
with mlflow.start_run(run_name="churn-baseline"):
model = RandomForestClassifier(n_estimators=200).fit(X_train, y_train)
mlflow.log_param("n_estimators", 200)
mlflow.log_metric("accuracy", model.score(X_test, y_test))
mlflow.sklearn.log_model(model, "model")Choose a runtime that contains your library, such as one of the sklearn, tensorflow or pytorch runtimes, or ask an administrator for a custom runtime.
Look at experiments, runs and the registry#
- Open the project's Models tab.
- Open the row menu of a model and select View in MLflow.
- Wait a few seconds. The message Please wait, you will be redirected to the MlFlow UI appears, and MLflow opens in a new browser tab.
- In MLflow, use Experiments to compare runs and their parameters, metrics and artifacts. Use the Models registry to see registered versions and their stages.


| Column | Meaning |
|---|---|
| Model Name | The name of the model |
| Updated By | The user who last changed it |
| Last Updated | The time of the last change, in your local time |
| Actions | View in MLflow and Export Model |
The status box beside the search field shows whether MLflow is running for you. It turns green when it is. Each user has one MLflow, and Groundzero reuses it if it is already running.
When you are done, select Stop Running Pod and confirm. You see Running MLFlow pod stopped successfully.
Share a model#
Publish a model#
- Open the row menu and select Export Model.
- If the name is new, you see name exported successfully.
- If a model with that name is already published, the Overwrite Export Model dialog asks you to confirm.
Publishing shares the model, together with the runtime it needs, with your site.
Import a published model#
- On the Models tab, select Import Model.
- In Select Model, choose a published model.
- Type an Experiment Name for your copy.
- Type Import Model As (must be unique). The dialog says Model Name is available in green or Model Name already taken in red.
- Select Import.

What happens next: You see name is getting imported. Groundzero registers the model in your MLflow, using the library it was built with (sklearn, tensorflow or pytorch).
Use a model#
- In a job or dataset editor, open Models in the left drawer and pick the model. It is loaded before your code runs.
- In a notebook, load it with MLflow in your own code.
Troubleshooting#
| Message | Cause | Fix |
|---|---|---|
| Error occurred while fetching running MLFlow pods | The check for a running MLflow did not work | Refresh the tab |
| Error occurred while starting MLFlow | MLflow could not start | Try again, and check that compute is available |
| Error occurred while exporting model | Publishing failed | Try again |
| Model Name already taken | The import name exists | Choose another name |
Administrators manage published models in the admin console.