Skip to content

Commit

Permalink
Merge branch 'main' into studio
Browse files Browse the repository at this point in the history
  • Loading branch information
amritghimire authored Nov 29, 2023
2 parents 79e784f + e9d6950 commit a63995a
Show file tree
Hide file tree
Showing 34 changed files with 700 additions and 500 deletions.
4 changes: 2 additions & 2 deletions content/docs/dvclive/how-it-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ make Git ignore it. It will generate a `model.pt.dvc` metadata file, which can
be tracked in Git and becomes part of the experiment. With this metadata file,
you can [retrieve](/doc/start/data-management/data-versioning#retrieving) the
versioned artifact from the Git commit. You can also use
`Live.log_artifact("model.pt", type="model")` to add it to the [DVC Studio Model
Registry].
`Live.log_artifact("model.pt", type="model")` to add it to the
[DVC Studio Model Registry](/doc/studio/model-registry).

Using `Live.log_image()` to log multiple images may also grow too large to track
with Git, in which case you can use
Expand Down
26 changes: 17 additions & 9 deletions content/docs/dvclive/live/log_metric.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# Live.log_metric()

```py
def log_metric(name: str, val: float, plot: Optional[bool] = True):
def log_metric(
name: str,
val: Union[int, float, str],
timestamp: bool = False,
plot: Optional[bool] = True
):
```

## Usage
Expand Down Expand Up @@ -41,7 +46,7 @@ timestamp step loss
The metrics history can be visualized with `dvc plots`:

```
dvc plots diff dvclive/plots
$ dvc plots diff dvclive/plots
```

</admon>
Expand All @@ -51,8 +56,8 @@ Each subsequent call to `live.log_metric(name, val)` will add a new row to

```python
live.next_step()
live.log_metric("train/loss", 0.2)
live.log_metric("val/loss", 0.4)
live.log_metric("train/loss", 0.2, timestamp=True)
live.log_metric("val/loss", 0.4, timestamp=True)
```

```ts
Expand Down Expand Up @@ -81,19 +86,22 @@ when exiting the `with` block:

The metrics summary can be visualized with `dvc metrics`:

```
dvc metrics diff dvclive/metrics.json
```cli
$ dvc metrics diff dvclive/metrics.json
```

</admon>

## Parameters

- `name` - Name of the metric being logged.
- `name` - name of the metric being logged.

- `val` - the value to be logged.

- `val` - The value to be logged.
- `timestamp` - whether to automatically log timestamp in the _metrics history_
file.

- `plot` - Whether to add the metric value to the _metrics history_ file for
- `plot` - whether to add the metric value to the _metrics history_ file for
plotting. If `false`, the metric will only be saved to the metrics summary.

## Exceptions
Expand Down
6 changes: 3 additions & 3 deletions content/docs/dvclive/live/log_param.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Live.log_param()

```py
def log_param(name: str, val: ParamLike):
def log_param(name: str, val: ParamLike):
```

Also see `Live.log_params()`.
Expand Down Expand Up @@ -41,9 +41,9 @@ automatically, and you can skip logging them with DVCLive.

## Parameters

- `name` - Name of the parameter being logged.
- `name` - name of the parameter being logged.

- `val` - The value to be logged.
- `val` - the value to be logged.

## Exceptions

Expand Down
2 changes: 1 addition & 1 deletion content/docs/dvclive/live/log_params.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Live.log_params()

```py
def log_params(params: Dict[ParamLike]):
def log_params(params: Dict[ParamLike]):
```

Also see `Live.log_param()`.
Expand Down
15 changes: 15 additions & 0 deletions content/docs/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,21 @@
"slug": "experiment-pipelines"
}
]
},
{
"label": "Model Management",
"slug": "model-management",
"source": "model-management/index.md",
"children": [
{
"label": "Model registry",
"slug": "model-registry"
},
{
"label": "Using and deploying models",
"slug": "model-cicd"
}
]
}
]
},
Expand Down
12 changes: 9 additions & 3 deletions content/docs/start/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ Now you're ready to DVC!

## Following This Guide

To help you understand and use DVC better, consider the following two use-cases:
**data management** and **experiment tracking**. You may pick either one to
start learning about how DVC helps you "solve" that scenario!
To help you understand and use DVC better, consider the following three
use-cases: **data management**, **experiment tracking** and **model
management**. You may pick any to start learning about how DVC helps you "solve"
that scenario!

Choose a trail to jump into its first chapter:

Expand All @@ -76,8 +77,13 @@ Choose a trail to jump into its first chapter:
by only instrumenting your code, and collaborate on ML experiments like
software engineers do for code.

- **[Model Management]** - Use the DVC model registry to manage the lifecycle of
your models in an auditable way. Easily access your models and integrate your
model registry actions into CICD pipelines to follow GitOps best practices.

[Data Management]: /doc/start/data-management/data-versioning
[Experiment Management]: /doc/start/experiments/experiment-tracking
[Model Management]: /doc/start/model-management/model-registry

<admon type="tip">

Expand Down
42 changes: 42 additions & 0 deletions content/docs/start/model-management/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: 'Get Started: Model Management'
description:
'Get started with DVC model management. Use the DVC model registry to manage
the lifecycle of your models in an auditable way. Easily access your models
and integrate your model registry actions into CICD pipelines to follow GitOps
best practices.'
---

# Get Started: Model Management

## Chapters

- **[Model registry]** - Set up a git-based model registry with DVC to track and
manage models, their versions and lifecycle stages.

- **[Using and deploying models]** - Easily download your models from the model
registry. Set up your CICD pipelines to be trigger by model registry actions
(such as assigning model stages) and deploy models directly form the model
registry.

[model registry]: /doc/start/model-management/model-registry
[Using and deploying models]: /doc/start/model-management/model-cicd

<admon type="tip">

These are captured in our [example-get-started-experiments] repo (you can [fork
it][example-get-started-experiments-fork] to follow along).

[example-get-started-experiments]:
https://github.com/iterative/example-get-started-experiments
[example-get-started-experiments-fork]:
https://github.com/iterative/example-get-started-experiments/fork

</admon>

## Where To Go Next

Pick a page from the list above, the left-side navigation bar, or just click
`NEXT` below!

Click [here](/doc/start/) to jump back to the Get Started landing page.
Loading

0 comments on commit a63995a

Please sign in to comment.