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

Commit

Permalink
Merge pull request #132 from iterative/docs/add-dvc-install-mention
Browse files Browse the repository at this point in the history
Docs: update DVC Use Case
  • Loading branch information
aguschin authored Jul 21, 2022
2 parents 37d8661 + 3113314 commit 2cd0170
Showing 1 changed file with 17 additions and 5 deletions.
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

0 comments on commit 2cd0170

Please sign in to comment.