Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exp run: Add --copy-paths. #4475

Merged
merged 3 commits into from
Apr 19, 2023
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
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.