From 1be4feaf7506537122eb48344ff3d53fc6ed5b81 Mon Sep 17 00:00:00 2001 From: David de la Iglesia Castro Date: Wed, 19 Apr 2023 11:04:08 +0200 Subject: [PATCH 1/3] exp run: Add `--copy-paths`. Per https://github.com/iterative/dvc/pull/9302 --- content/docs/command-reference/exp/run.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/content/docs/command-reference/exp/run.md b/content/docs/command-reference/exp/run.md index d90f051cbe..bcdc143161 100644 --- a/content/docs/command-reference/exp/run.md +++ b/content/docs/command-reference/exp/run.md @@ -140,6 +140,9 @@ committing them to the Git repo. Unnecessary ones can be [cleared] with - `-f`, `--force` - reproduce pipelines even if no changes were found (same as `dvc repro -f`). +- `-C `, `--copy-paths ` - List of ignored or untracked paths to + copy into the temp directory. Only used if `--temp` or `--queue` is specified. + - `-h`, `--help` - prints the usage/help message, and exits. - `-q`, `--quiet` - do not write anything to standard output. Exit with 0 if all @@ -292,3 +295,16 @@ $ dvc queue start [grid search]: https://en.wikipedia.org/wiki/Hyperparameter_optimization#Grid_search + +## Example: Include untracked or ignored paths + +If your code relies on some paths that are intentionally untracked or ignored by +Git, you can use `-C/--copy-paths` to ensure those files are accessible when you +use the `--temp` or `--queue` flags: + +```cli +$ dvc exp run --temp -C secrets.txt -C symlinked-directory +``` + +The paths will be copied to the temporary directory but will _not_ be tracked by +Git or DVC so the paths are not unintentionally leaked. From f0caf49bd8603b0ce3ced89c7f33147e1c730abe Mon Sep 17 00:00:00 2001 From: David de la Iglesia Castro Date: Wed, 19 Apr 2023 11:05:05 +0200 Subject: [PATCH 2/3] reword --- content/docs/command-reference/exp/run.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/docs/command-reference/exp/run.md b/content/docs/command-reference/exp/run.md index bcdc143161..55ae4df8b6 100644 --- a/content/docs/command-reference/exp/run.md +++ b/content/docs/command-reference/exp/run.md @@ -306,5 +306,5 @@ use the `--temp` or `--queue` flags: $ dvc exp run --temp -C secrets.txt -C symlinked-directory ``` -The paths will be copied to the temporary directory but will _not_ be tracked by -Git or DVC so the paths are not unintentionally leaked. +The paths will be copied to the temporary directory but will _not_ be tracked, +to prevent unintentional leaks. From 940c94c139322d74a34196afc26df686637a9bdc Mon Sep 17 00:00:00 2001 From: David de la Iglesia Castro Date: Wed, 19 Apr 2023 11:05:45 +0200 Subject: [PATCH 3/3] Update usage --- content/docs/command-reference/exp/run.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/command-reference/exp/run.md b/content/docs/command-reference/exp/run.md index 55ae4df8b6..e63426f6ae 100644 --- a/content/docs/command-reference/exp/run.md +++ b/content/docs/command-reference/exp/run.md @@ -19,7 +19,7 @@ usage: dvc exp run [-h] [-q | -v] [-f] { repro options ... } [-n ] [-S [:]] [--queue] [--run-all] [-j ] [--temp] - [-r ] [--reset] + [-r ] [--reset] [-C ] [targets [targets ...]] positional arguments: