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

remove specific experiments in queue #2715

30 changes: 29 additions & 1 deletion content/docs/command-reference/exp/remove.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ positional arguments:

## Description

Deletes one or more experiments, indicated by name (see `dvc exp run`).
Deletes one or more experiments, indicated by name (see `dvc exp run`) or ID
(only queued experiments).

With `--queue`, the list of experiments awaiting execution is cleared instead.

Expand Down Expand Up @@ -65,3 +66,30 @@ $ dvc exp list
```

Nothing is listed after the last `dvc exp list` because they're all gone.

The same applies to queued experiments but these won't have a name to give to
`dvc exp remove` yet (unless you specified one). Alternatively, you can use their ID
(shown when queued, and by `dvc exp show`). Let's queue a few experiments
and then delete some of them:
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved

```dvc
$ dvc exp run --queue -S train.min_split=64
Queued experiment 'e41d5b4' for future execution.
$ dvc exp run --queue -S train.min_split=32 --name split32
Queued experiment '5751540' for future execution.
$ dvc exp run --queue -S train.min_split=16 --name split16
Queued experiment '8de9a6c' for future execution.

$ dvc exp remove e41d5b4 split16
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved
$ dvc exp show --include-params=train.min_split --no-pager
```

```table
┏━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━┓
┃ Experiment ┃ Created ┃ State ┃ avg_prec ┃ roc_auc ┃ train.min_split ┃
┡━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━┩
│ workspace │ - │ - │ 0.57553 │ 0.94652 │ 2 │
│ master │ Aug 02, 2021 │ - │ 0.53252 │ 0.9107 │ 2 │
│ └── 5751540 [split32] │ 04:57 PM │ Queued │ - │ - │ 32 │
└───────────────────────┴──────────────┴────────┴──────────┴─────────┴─────────────────┘
```
Comment on lines +85 to +96
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should use exp list instead to simplify this example. exp show can be noisy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried on my computer that dvc list could not show queued exps.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, neither dvc exp list nor dvc exp list --all shows the queued experiments. It looks the only way to get the list of queued experiments is via dvc exp show.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK let's keep the exp show table then. Thanks

BTW should exp list print queued exps? Is there an issue in the core repo perhaps?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH I think the best solution is moving all of this queue functionality into a queue command as suggested in iterative/dvc#5615. I have avoided it because it's a bigger change, but I think it will be needed soon, especially now that we are working on remote execution.