Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Few model registry docs updates #4587

Merged
merged 3 commits into from
Jun 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions content/docs/dvclive/how-it-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ with Live(save_dvc_exp=True) as live:
Path("model.pt").write_text(str(random.random()))
live.next_step()

live.log_artifact("model.pt")
live.log_artifact("model.pt", type="model", name="mymodel")
live.log_sklearn_plot("confusion_matrix", [0, 0, 1, 1], [0, 1, 0, 1])
live.log_metric("summary_metric", 1.0, plot=False)
# live.end() has been called at this point
Expand Down Expand Up @@ -92,8 +92,8 @@ the versioned artifact from the Git commit.
If `Live` was initialized with `dvcyaml=True` (which is the default), this will
add an [artifact](/doc/user-guide/project-structure/dvcyaml-files#artifacts) to
the corresponding `dvc.yaml`. Passing `type="model"` will mark it as a `model`
for DVC and will also make [Studio Model Registry](/doc/studio) support it
(coming soon!).
for DVC and will also show it in
[Studio Model Registry](/doc/studio/user-guide/model-registry/what-is-a-model-registry).

### Run with DVC

Expand Down
2 changes: 2 additions & 0 deletions content/docs/dvclive/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ with Live(save_dvc_exp=True) as live:
live.log_metric(metric_name, value)

live.next_step()

live.log_artifact(path, type="model", name=name)
```

## Outputs
Expand Down
27 changes: 17 additions & 10 deletions content/docs/studio/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,25 @@ details]).
assignments.

[models dashboard]:
/doc/studio/user-guide/model-registry/view-models#models-dashboard
/doc/studio/user-guide/model-registry/view-and-compare-models#models-dashboard

2. Click on the model name to
[open its details page](/doc/studio/user-guide/model-registry/view-models#model-details-page).

3. You can perform the following actions to manage the life cycle of models:
- [Register new models](/doc/studio/user-guide/model-registry/add-a-model)
from your Git repositories and remote (cloud) storages.
- [Register model versions](/doc/studio/user-guide/model-registry/register-version)
- [Assign stages](/doc/studio/user-guide/model-registry/assign-stage) (e.g.,
development, staging, production)
- Unassign stages, deregister versions or deprecate (remove) models
[open its details page](/doc/studio/user-guide/model-registry/view-and-compare-models#model-details-page).

3. You can perform the following actions to manage the lifecycle of models:
- [Add models to the registry](/doc/studio/user-guide/model-registry/add-a-model)
- [Register new versions of the models](/doc/studio/user-guide/model-registry/register-version)
(like `v0.0.1` and `v1.0.0`)
- [Assign stages to model versions](/doc/studio/user-guide/model-registry/assign-stage)
(e.g. `dev`, `testing`, `prod`)
- Use models:
[download them](/doc/studio/user-guide/model-registry/use-models) or
[set up CI/CD](/doc/studio/user-guide/model-registry/use-models) to publish
or deploy models

Check out
[`What is a model registry?`](/doc/studio/user-guide/model-registry/what-is-a-model-registry)
to get started.

## Collaborate

Expand Down
13 changes: 7 additions & 6 deletions content/docs/studio/user-guide/model-registry/add-a-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ your model registry, Iterative Studio creates an annotation for it in a
`dvc.yaml` file in your Git repository. You can add a model in any of the
following ways:

1. Log your model during the training process using [dvclive].
2. Edit [`dvc.yaml`](/doc/user-guide/project-structure/dvcyaml-files#artifacts)
directly.
1. Log your model during the training process using [dvclive] by calling
[`live.log_artifact(path, type="model")`][log_artifact] method.
2. Edit `dvc.yaml` directly and add your model to [`artifacts`] section.
3. Use the Iterative Studio interface (watch this tutorial video or read on
below).

Expand Down Expand Up @@ -41,8 +41,7 @@ https://www.youtube.com/watch?v=szzv4ZXmYAs

5. Provide labels for your model. For example, if your model is about reviewing
sentiment analysis using natural language processing, one of the labels may
be `nlp`. You can provide multiple labels as a comma separated list. Eg,
`nlp, sentiment_analysis`.
be `nlp` or `sentiment_analysis`.

6. Optionally, add a brief description for your model.

Expand Down Expand Up @@ -75,4 +74,6 @@ before the commit is created:
/doc/studio/user-guide/projects-and-experiments/create-a-project
[gto]: https://mlem.ai/doc/gto
[mlem]: https://mlem.ai/
[dvclive]: /doc/dvclive/live/log_artifact
[dvclive]: /doc/dvclive
[log_artifact]: /doc/dvclive/live/log_artifact
[`artifacts`]: /doc/user-guide/project-structure/dvcyaml-files#artifacts
4 changes: 4 additions & 0 deletions content/docs/studio/user-guide/model-registry/use-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,7 @@ for you to use them in CI.
That example repo also introduces a workflow
[that deploys a model](https://github.com/iterative/example-gto/blob/mlem/.github/workflows/deploy-model-with-mlem.yml)
from CI/CD using MLEM.

Finally, you can find examples of building a Docker Image with a model and
deploying it to the cloud in
[GTO User Guide](https://mlem.ai/doc/gto/user-guide#acting-on-new-registrations-and-assignments).