diff --git a/content/docs/start/model-management/model-registry.md b/content/docs/start/model-management/model-registry.md index 6014f69397..5b3397dd1b 100644 --- a/content/docs/start/model-management/model-registry.md +++ b/content/docs/start/model-management/model-registry.md @@ -18,27 +18,41 @@ speed things up, we will start from a git [repository](https://github.com/iterative/example-get-started-model-management) with a model training pipeline already set up and ready to use. -To see how you can track experiments and set up training pipelines with DVC and DVCLive, -have a look at our getting started guide for [experiment management](/doc/start/experiments). +To see how you can track experiments and set up training pipelines with DVC and +DVCLive, have a look at our getting started guide for +[experiment management](/doc/start/experiments). ## DVC Model registry overview -In DVC Studio we can access the model registry by clicking on Models in the top menu. This will show you a dashboard with all models from all projects you have access to. You can check out our [public model registry example](https://studio.iterative.ai/team/Iterative/models). - -From the dashboard you will have an overview of all models, latest model versions as well stages each of the model versions is assigned to. You can also see which git repository for each model and get more details for it by clicking on the model name. - -Here you will see some extra information about a particular model - a description of the model, any labels that were assigned and particularly the history of all model registry actions on that selected model. For each model version you can also have a look at its metrics tracked by the experiment tracked. +In DVC Studio we can access the model registry by clicking on Models in the top +menu. This will show you a dashboard with all models from all projects you have +access to. You can check out our +[public model registry example](https://studio.iterative.ai/team/Iterative/models). +From the dashboard you will have an overview of all models, latest model +versions as well stages each of the model versions is assigned to. You can also +see which git repository for each model and get more details for it by clicking +on the model name. +Here you will see some extra information about a particular model - a +description of the model, any labels that were assigned and particularly the +history of all model registry actions on that selected model. For each model +version you can also have a look at its metrics tracked by the experiment +tracked. ## Adding models Let's now train a model and add it to the model registry. -We have three options how to add a model to the model registry. In this guide, we will be using DVCLive and add a model using Python code. This will also automatically save the model to DVC. +We have three options how to add a model to the model registry. In this guide, +we will be using DVCLive and add a model using Python code. This will also +automatically save the model to DVC. -We use the [`log_artifact`](/doc/dvclive/live/log_artifact) method -to save the model and add it to the model registry. Open the training notebook `notebooks/TrainSegModel.ipynb` in our example repository and in the last cell of the notebook add the method call inside the `with Live(...)` statement as follows. +We use the [`log_artifact`](/doc/dvclive/live/log_artifact) method to save the +model and add it to the model registry. Open the training notebook +`notebooks/TrainSegModel.ipynb` in our example repository and in the last cell +of the notebook add the method call inside the `with Live(...)` statement as +follows. ```python with Live(...) as live: @@ -54,9 +68,15 @@ with Live(...) as live: ) ``` -Here the `path` parameter tells DVC that our model is to be found under `"models/model.pkl"`, the `type` parameter is `"model"` and so it will show up in the Studio registry (other artifact types will not) and the rest of the parameters are descriptive and optional and will also show up in the model registry. +Here the `path` parameter tells DVC that our model is to be found under +`"models/model.pkl"`, the `type` parameter is `"model"` and so it will show up +in the Studio registry (other artifact types will not) and the rest of the +parameters are descriptive and optional and will also show up in the model +registry. -If we now run the code and commit the result to git (and push it to our git remote), the new model will show up in the model registry in Studio. You should see something like the following picture. +If we now run the code and commit the result to git (and push it to our git +remote), the new model will show up in the model registry in Studio. You should +see something like the following picture. ![Newly added model in the Model Registry](/img/mr-newly-added-model.png) @@ -64,19 +84,28 @@ If we now run the code and commit the result to git (and push it to our git remo #### 💡 Expand to see other ways to add models -The other two options are to use the Studio's graphical user interface to add models interactively or to manually edit `dvc.yaml` files to add information about model artifacts. To get more details on the ways to add models have a look at the [Model registry documentation](/doc/studio/user-guide/model-registry/add-a-model). +The other two options are to use the Studio's graphical user interface to add +models interactively or to manually edit `dvc.yaml` files to add information +about model artifacts. To get more details on the ways to add models have a look +at the +[Model registry documentation](/doc/studio/user-guide/model-registry/add-a-model). ## TODO Versioning models -Now that we have our first model in the model registry, we can start registering model -versions for the model. This really amounts to choosing specific commit in our model development history and attaching a version to it to keep an easier track of it. We will do that directly in the Studio UI as follows +Now that we have our first model in the model registry, we can start registering +model versions for the model. This really amounts to choosing specific commit in +our model development history and attaching a version to it to keep an easier +track of it. We will do that directly in the Studio UI as follows ![Registering model versions](/img/placeholder-cat.gif) - -Once we register our first model version, the model registry will also automatically connect with the experiment tracking and all metrics which are tracked for our model version will also show up in the model registry. We can even explore the experiment directly by clicking on the "Open in Project" button on the model detail page. +Once we register our first model version, the model registry will also +automatically connect with the experiment tracking and all metrics which are +tracked for our model version will also show up in the model registry. We can +even explore the experiment directly by clicking on the "Open in Project" button +on the model detail page. - TODO - for a model version we can view the experiment metadata and observe the associated experiment directly