From e32d2276c8f15d7d2c07cd7190466f4268ee350a Mon Sep 17 00:00:00 2001 From: Alexander Guschin <1aguschin@gmail.com> Date: Mon, 11 Jul 2022 14:54:12 +0600 Subject: [PATCH 1/8] Update dvc.md --- content/docs/use-cases/dvc.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/content/docs/use-cases/dvc.md b/content/docs/use-cases/dvc.md index 4fb0de3d..282373b8 100644 --- a/content/docs/use-cases/dvc.md +++ b/content/docs/use-cases/dvc.md @@ -22,6 +22,9 @@ $ source .venv/bin/activate $ pip install -r requirements.txt ``` +This will install DVC with `pip`. Learn about other ways to install DVC +[here](https://dvc.org/doc/install). + Often it’s a bad idea to store binary files in Git, especially big ones. To From 3b203aa10636966cca82fd2ce8ff01901f0ab21c Mon Sep 17 00:00:00 2001 From: Alexander Guschin <1aguschin@gmail.com> Date: Tue, 12 Jul 2022 19:04:41 +0600 Subject: [PATCH 2/8] move DVC mention above --- content/docs/use-cases/dvc.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/docs/use-cases/dvc.md b/content/docs/use-cases/dvc.md index 282373b8..5c4a3b92 100644 --- a/content/docs/use-cases/dvc.md +++ b/content/docs/use-cases/dvc.md @@ -14,7 +14,10 @@ $ git checkout 1-dvc-mlem-init ``` Next let's create an isolated virtual environment to cleanly install all the -requirements (including MLEM) there: +requirements (including MLEM) there. + +This will also install DVC with `pip`. Learn about other ways to install DVC +[here](https://dvc.org/doc/install). ```shell $ python3 -m venv .venv @@ -22,9 +25,6 @@ $ source .venv/bin/activate $ pip install -r requirements.txt ``` -This will install DVC with `pip`. Learn about other ways to install DVC -[here](https://dvc.org/doc/install). - Often it’s a bad idea to store binary files in Git, especially big ones. To From 2f0fa9f3e0e40b10cb133d831e37cf155083b997 Mon Sep 17 00:00:00 2001 From: Alexander Guschin <1aguschin@gmail.com> Date: Wed, 13 Jul 2022 16:14:55 +0600 Subject: [PATCH 3/8] Update content/docs/use-cases/dvc.md Co-authored-by: Jorge Orpinel --- content/docs/use-cases/dvc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/use-cases/dvc.md b/content/docs/use-cases/dvc.md index 5c4a3b92..846414d6 100644 --- a/content/docs/use-cases/dvc.md +++ b/content/docs/use-cases/dvc.md @@ -13,7 +13,7 @@ $ cd example-mlem-get-started $ git checkout 1-dvc-mlem-init ``` -Next let's create an isolated virtual environment to cleanly install all the +Next let's create a Python virtual environment to cleanly install all the requirements (including MLEM) there. This will also install DVC with `pip`. Learn about other ways to install DVC From ab93762094c79aa2eb4656a398eaaa3380af1dac Mon Sep 17 00:00:00 2001 From: Alexander Guschin <1aguschin@gmail.com> Date: Fri, 15 Jul 2022 15:55:54 +0600 Subject: [PATCH 4/8] Update content/docs/use-cases/dvc.md Co-authored-by: Jorge Orpinel --- content/docs/use-cases/dvc.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/content/docs/use-cases/dvc.md b/content/docs/use-cases/dvc.md index 846414d6..040139fa 100644 --- a/content/docs/use-cases/dvc.md +++ b/content/docs/use-cases/dvc.md @@ -14,10 +14,14 @@ $ git checkout 1-dvc-mlem-init ``` Next let's create a Python virtual environment to cleanly install all the -requirements (including MLEM) there. +requirements with `pip` (including DVC and MLEM). -This will also install DVC with `pip`. Learn about other ways to install DVC -[here](https://dvc.org/doc/install). + + +There are other ways to [install DVC](https://dvc.org/doc/install) but +MLEM requires the `dvc` Python package for this integration. + + ```shell $ python3 -m venv .venv From c8321be27b428f6fdb0ce274feb5a5d2d6a097c3 Mon Sep 17 00:00:00 2001 From: Alexander Guschin <1aguschin@gmail.com> Date: Fri, 15 Jul 2022 15:56:45 +0600 Subject: [PATCH 5/8] remove mention of other ways to install dvc --- content/docs/use-cases/dvc.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/content/docs/use-cases/dvc.md b/content/docs/use-cases/dvc.md index 040139fa..73566ba6 100644 --- a/content/docs/use-cases/dvc.md +++ b/content/docs/use-cases/dvc.md @@ -16,13 +16,6 @@ $ git checkout 1-dvc-mlem-init Next let's create a Python virtual environment to cleanly install all the requirements with `pip` (including DVC and MLEM). - - -There are other ways to [install DVC](https://dvc.org/doc/install) but -MLEM requires the `dvc` Python package for this integration. - - - ```shell $ python3 -m venv .venv $ source .venv/bin/activate From c20d14298b29e092a6161c78316dab20f546ec09 Mon Sep 17 00:00:00 2001 From: Alexander Guschin <1aguschin@gmail.com> Date: Fri, 15 Jul 2022 17:39:34 +0600 Subject: [PATCH 6/8] fix tutorial --- content/docs/use-cases/dvc.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/content/docs/use-cases/dvc.md b/content/docs/use-cases/dvc.md index 73566ba6..20830865 100644 --- a/content/docs/use-cases/dvc.md +++ b/content/docs/use-cases/dvc.md @@ -4,13 +4,13 @@ ### ⚙️ 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 a Python virtual environment to cleanly install all the @@ -41,6 +41,8 @@ $ 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 @@ -56,6 +58,13 @@ $ echo "/**/?*.mlem" > .dvcignore $ git add .dvcignore ``` +Now 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 @@ -84,7 +93,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 From a010fc1f5ecb77ee89b7d1d3d890e88d4eebbf25 Mon Sep 17 00:00:00 2001 From: Alexander Guschin <1aguschin@gmail.com> Date: Fri, 15 Jul 2022 17:40:10 +0600 Subject: [PATCH 7/8] format --- content/docs/use-cases/dvc.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/docs/use-cases/dvc.md b/content/docs/use-cases/dvc.md index 20830865..f628301f 100644 --- a/content/docs/use-cases/dvc.md +++ b/content/docs/use-cases/dvc.md @@ -59,6 +59,7 @@ $ git add .dvcignore ``` Now we need to stop Git from keeping already indexed binaries: + ```cli git rm -r --cached .mlem ``` From 3113314a075b467a22741d247485e22e90a1b972 Mon Sep 17 00:00:00 2001 From: Alexander Guschin <1aguschin@gmail.com> Date: Fri, 15 Jul 2022 17:51:42 +0600 Subject: [PATCH 8/8] fix few things --- content/docs/use-cases/dvc.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/content/docs/use-cases/dvc.md b/content/docs/use-cases/dvc.md index f628301f..fa23495a 100644 --- a/content/docs/use-cases/dvc.md +++ b/content/docs/use-cases/dvc.md @@ -41,6 +41,7 @@ $ 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. @@ -58,12 +59,13 @@ $ echo "/**/?*.mlem" > .dvcignore $ git add .dvcignore ``` -Now we need to stop Git from keeping already indexed binaries: +Finally, we need to stop Git from keeping already indexed binaries. ```cli -git rm -r --cached .mlem +$ 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