MLflow is a free plugin for nself that adds ML experiment tracking, model versioning, and a model registry to your backend stack. As of v1.0.9, MLflow is no longer a built-in optional service — it installs via the plugin system.
# Install the MLflow plugin (free, no license required)
nself plugin install mlflow
# Rebuild and start to apply
nself build && nself startOnce installed, MLflow is accessible at:
https://mlflow.local.nself.orghttps://mlflow.<your-domain>MLflow requires:
MINIO_ENABLED=true)After the plugin is installed, the following commands are available:
| Command | Description |
|---|---|
nself mlflow | Show status |
nself mlflow open | Open MLflow UI in browser |
nself mlflow configure <setting> <value> | Configure settings |
nself mlflow experiments | List experiments |
nself mlflow experiments create <name> | Create experiment |
nself mlflow experiments delete <id> | Delete experiment |
nself mlflow runs [exp_id] | List runs |
nself mlflow test | Test connection |
nself mlflow logs [-f] | View logs |
# List all experiments
nself mlflow experiments list
# Create a new experiment
nself mlflow experiments create "My Experiment"
# Delete an experiment by ID
nself mlflow experiments delete 1
# List runs from experiment ID 1
nself mlflow runs 1Log experiments from your Python ML code:
import mlflow
# Set tracking URI to your nself MLflow instance
mlflow.set_tracking_uri("http://mlflow.local.nself.org")
# Create or set experiment
mlflow.set_experiment("text-classification")
# Start a run
with mlflow.start_run():
mlflow.log_param("learning_rate", 0.01)
mlflow.log_param("epochs", 100)
model = train_model(learning_rate=0.01, epochs=100)
mlflow.log_metric("accuracy", 0.95)
mlflow.log_metric("f1_score", 0.93)
mlflow.sklearn.log_model(model, "model")
mlflow.log_artifact("confusion_matrix.png")import mlflow
# Register a model
model_uri = "runs:/<run_id>/model"
mlflow.register_model(model_uri, "TextClassifier")
# Load a registered model
model = mlflow.pyfunc.load_model("models:/TextClassifier/Production")
# Transition model stage
client = mlflow.tracking.MlflowClient()
client.transition_model_version_stage(
name="TextClassifier",
version=1,
stage="Production"
)Environment variables set automatically by the plugin after installation:
MLFLOW_VERSION=2.9.2
MLFLOW_PORT=5000
MLFLOW_USERNAME=admin
MLFLOW_PASSWORD=<auto-generated>
MLFLOW_DB_NAME=mlflow
MLFLOW_ARTIFACTS_BUCKET=mlflow-artifacts# Set username
nself mlflow configure username admin
# Set/generate password
nself mlflow configure password
# Change port
nself mlflow configure port 5001Ensure the plugin is installed (nself plugin list | grep mlflow) and the service is running (nself status).
Verify the tracking URI matches your environment. For Docker, use the service name: http://mlflow:5000.
Ensure MinIO is enabled (MINIO_ENABLED=true) and the nself stack was rebuilt after enabling it.