Skip to content

Commit

Permalink
exp run: Add --copy-paths. (#4475)
Browse files Browse the repository at this point in the history
* exp run: Add `--copy-paths`.

Per iterative/dvc#9302

* reword

* Update usage
  • Loading branch information
daavoo authored Apr 19, 2023
1 parent 60a7e9f commit e4cdd4c
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion content/docs/command-reference/exp/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ usage: dvc exp run [-h] [-q | -v] [-f]
{ repro options ... } [-n <name>]
[-S [<filename>:]<override_pattern>]
[--queue] [--run-all] [-j <number>] [--temp]
[-r <experiment_rev>] [--reset]
[-r <experiment_rev>] [--reset] [-C <path>]
[targets [targets ...]]
positional arguments:
Expand Down Expand Up @@ -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 <path>`, `--copy-paths <path>` - 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
Expand Down Expand Up @@ -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,
to prevent unintentional leaks.

0 comments on commit e4cdd4c

Please sign in to comment.