From 49c585cd69eb69da0befaeb61435fb14504a2b2e Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Tue, 21 Dec 2021 00:51:10 -0700 Subject: [PATCH] ref: better explain exp apply behavior explicitly rel. https://github.com/iterative/dvc.org/pull/3080#discussion_r769709333 --- content/docs/command-reference/exp/apply.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/content/docs/command-reference/exp/apply.md b/content/docs/command-reference/exp/apply.md index c012e4ef12..7fc1d72597 100644 --- a/content/docs/command-reference/exp/apply.md +++ b/content/docs/command-reference/exp/apply.md @@ -14,17 +14,20 @@ positional arguments: ## Description -Restores an `experiment` into the workspace as long as no more Git commits have -been made after the target experiment (`HEAD` hasn't moved). The experiment can -be referenced by name or hash (see `dvc exp run` for details). +Restores an `experiment` into the workspace, as long as we're on the same +project baseline (Git `HEAD`) as when the target experiment was run. The +experiment can be referenced by name or hash (see `dvc exp run` for details). -Specifically, `dvc exp apply` changes any files (code, data, -parameters, metrics, etc.) needed to reflect the -experiment conditions and results in the workspace. Current changes to the -workspace are preserved except if they conflict with the experiment in question. +Specifically, `dvc exp apply` checks out any files or directories needed to +reflect the experiment conditions and results. This can include both with DVC +and Git: code, data, parameters, metrics, etc. -⚠️ Conflicting changes in the workspace are overwritten unless unless -`--no-force` is used. +> Note that existing changes in the workspace that don't conflict the +> `experiment` are left alone. This may result in a mix of other changes with +> the ones applied by this command. + +⚠️ Conflicting changes in the workspace are overwritten unless `--no-force` is +used. This is typically used after choosing a target `experiment` with `dvc exp show` or `dvc exp diff`, and before committing it to Git (making it [persistent].