A machine learning engineer is using MLflow to track experiments and has logged a model with a signature. They now want to register this model in the MLflow Model Registry and promote it to Production. Which MLflow API call should they use to add the model to the registry?
mlflow.register_model is the correct API to register an existing model artifact from a run into the Model Registry. It takes the model URI (e.g., runs:/<run_id>/model) and the desired model name. This call creates a new model version in the registry, which can then be transitioned to Production.
Why this answer
The mlflow.register_model function is designed to take an existing model URI and add it as a new version to the Model Registry. It is the standard way to register a model after logging. Other options either create empty models or log new models, which do not fit the scenario of promoting an already logged model.
Exam trap
The trap here is confusing the API for creating a registered model container with the API for adding a version from an existing run.