# Model Registry

*AI/ML Accelerator - MLflow is specifically built to track your ML experiments on the DNAnexus platform environment via the ML JupyterLab (another app in the AI/ML Accelerator package) environment. A license is required in order to use the AI/ML Accelerator package. For more information, please contact DNAnexus Sales via* [*sales@dnanexus.com*](mailto:sales@dnanexus.com)*.*

## **Registering You Model**

Once being logged, a model can be registered by the MLflow Model Registry. For more information on how MLflow Model Registry works, please see [MLflow documentation](https://mlflow.org/docs/latest/model-registry.html). When a model is successfully registered, it will be available on the Models page and have version control.

You can register a model in the Model Registry through both GUI and API.

## **Register a Model though GUI**

In the GUI of the MLflow Tracking Server, follow the below steps to register your MLflow model.

1\. In the Experiments section, click on your experiment (e.g. 'TCGA Breast Cancer' as below). Then, select the run (model) that you would like to register.

{alt="Detailed page of an Experiment"}

<figure><img src="/files/z5WI6iuaB7ksvrOVg0VV" alt=""><figcaption></figcaption></figure>

Detailed page of an Experiment

2\. You will be directed to the detailed page of the selected run (model). In this section, select 'Artifacts', and click on 'model'. Then, you will be able to register your run as a new registered model (by defining a new model name) or as a new version of an existing model (by selecting an existing registered model).

{alt="Detailed page of a selected run (model)"}

<figure><img src="/files/mRdoqkSa2Yvxam9kr0h8" alt=""><figcaption></figcaption></figure>

Detailed page of a selected run (model)

## **Register a Model though API**

Another way to register your run (model) is through the MLflow model flavor or the MLflow Client Tracking API interface. Specifically, you can register a model either during an MLflow experiment run or after completing all your experiment runs. Below is an example of model registration through API.

```
# Define name of the registered model and assign the run ID
model_name = "tcga_breast_cancer_model" # Assign any name for your registered model
run_id = "xxxx" # ID generated by MLflow once you log a run
# Register the model to the MLflow Model Registry
registered_model = mlflow.register_model(model_uri=f"runs:/{run_id}/model", name=model_name)
```

run\_id can be retrieved through the GUI of  MLflow Tracking Server or directly from a session in your notebook via the start\_run() method. See the example below:

```
with mlflow.start_run() as run:
## your ML scripts
run_id = run.info.run_id  # This is your run_id
```

## **Resources**

[Full Documentation](https://documentation.dnanexus.com/)

To create a support ticket if there are technical issues:

1. Go to the Help header (same section where Projects and Tools are) inside the platform
2. Select "Contact Support"
3. Fill in the Subject and Message to submit a support ticket.

\
\\


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://academy.dnanexus.com/mlaccelerator/mlflow/modelregistrymlflow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
