Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Docs: update DVC Use Case #132

Merged
merged 8 commits into from
Jul 21, 2022
Merged
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
22 changes: 17 additions & 5 deletions content/docs/use-cases/dvc.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@

### ⚙️ Expand for setup instructions

If you want to follow along with this tutorial and try MLEM, you can use our
If you want to follow along with this tutorial, you can use our
[example repo](https://github.com/iterative/example-mlem-get-started).

```shell
$ git clone https://github.com/iterative/example-mlem-get-started
$ cd example-mlem-get-started
$ git checkout 1-dvc-mlem-init
$ git checkout 5-deploy-meta
```

Next let's create an isolated virtual environment to cleanly install all the
requirements (including MLEM) there:
Next let's create a Python virtual environment to cleanly install all the
requirements with `pip` (including DVC and MLEM).

```shell
$ python3 -m venv .venv
Expand All @@ -41,6 +41,9 @@ $ dvc remote add myremote -d /tmp/dvcstore/
$ git add .dvc/config
```

[DVC Initialized](https://github.com/iterative/example-mlem-get-started/tree/7-dvc-dvc-init)

Now, we also need to setup MLEM so it knows to use DVC.

```cli
Expand All @@ -56,6 +59,15 @@ $ echo "/**/?*.mlem" > .dvcignore
$ git add .dvcignore
```

Finally, we need to stop Git from keeping already indexed binaries.

```cli
$ git rm -r --cached .mlem
```

[Configured MLEM to work with DVC](https://github.com/iterative/example-mlem-get-started/tree/8-dvc-mlem-config)

## Saving objects

Next, let’s remove artifacts from Git and re-save them, so MLEM can use new
Expand Down Expand Up @@ -84,7 +96,7 @@ Now, you can load MLEM objects from your repo even though there are no actual
binaries stored in Git. MLEM will know to use DVC to load them.

[Switch to DVC](https://github.com/iterative/example-mlem-get-started/tree/4-dvc-save-models)
[Switch to DVC](https://github.com/iterative/example-mlem-get-started/tree/9-dvc-save-models)

# Using MLEM in DVC Pipeline

Expand Down