mlflow.start_run() in a Notebook starts a new Run. Within a Run, you can record:mlflow.start_run(nested=True) again within the context of a parent Run, and the new Run becomes a child Run of the parent Run. This is commonly used in hyperparameter tuning scenarios. Example:import mlflowwith mlflow.start_run(run_name="Parent Run"):mlflow.log_param("model_type", "CNN")for i in range(3):with mlflow.start_run(run_name=f"Child Run {i}", nested=True):mlflow.log_param("learning_rate", 0.01 * (i + 1))mlflow.log_metric("accuracy", 0.8 + 0.05 * i)
learning_rate: 0.01batch_size: 64n_estimators: 100max_depth: 6mlflow.log_param(key, value). Once recorded, parameters cannot be modified.accuracy, AUC, F1, precision, recall (classification)RMSE, MAE, R2 (regression)loss, val_loss (deep learning)mlflow.log_metric(key, value, step=None). You can call it multiple times to record the training curve..pkl / .pt / .onnx, and so on).stdout, stderr, log.txt)config.yaml, params.json)mlflow.log_artifact(local_path, artifact_path=None) or mlflow.<flavor>.log_model(...).Metric | Description |
cpu_utilization_percentage | CPU Utilization |
system_memory_usage_megabytes | System memory usage |
system_memory_usage_percentage | System memory usage percentage |
network_receive_megabytes | Inbound network traffic |
network_transmit_megabytes | Outbound network traffic |
disk_usage_megabytes | Used disk capacity |
disk_available_megabytes | Available disk capacity |
mlflow.<flavor>.log_model(...) is saved as an artifact of the Run. A model can be in one of the following two states:registered_model_name= parameter in your code, the model is registered to the MLflow Model Registry under Catalog and has a three-part full name in the format of catalog.schema.model_name and an incremented version number.Scenario | Relationship |
A Run trains and saves a model (basic scenario). | A Run corresponds to a model on a one-to-one basis. |
A Run saves multiple model snapshots across multiple epochs (deep learning). | A Run corresponds to multiple model artifacts (such as torch-iris-10, torch-iris-50, and torch-iris-100). |
Training the same model architecture multiple times with different parameters (hyperparameter tuning) | The same registered model corresponds to multiple Runs, each representing a different model version. |
Parent and child Runs save models separately (for example, hyperparameter tuning experiments). | A parent Run is associated with multiple child Runs, and each child Run is associated with one model artifact. |
Permission Level | Available Operations |
Read (Can Read) | View basic experiment information, parameters/metrics/models/artifacts of all runs, and Run history; export experiment results; view permission settings (read-only). |
Edit (Can Edit) | Have all capabilities of the Can Read role; create Runs and modify parameters/metrics/artifacts in Runs; edit experiment descriptions and Tags. |
Manage (Can Manage) | Have all capabilities of the Can Edit role; delete experiments and assign permissions to other users. |
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback