# \`dvc exp run\` runs multiple experiments by default

**URL:** <https://discuss.dvc.org/t/dvc-exp-run-runs-multiple-experiments-by-default/2320>\
**Category:** Questions\
**Created:** [November 27, 2024, 10:15am UTC](https://discuss.dvc.org/t/dvc-exp-run-runs-multiple-experiments-by-default/2320 "2024-11-27T10:15:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xavier.fontaine](https://avatars.discourse-cdn.com/v4/letter/x/9de053/32.png) [@xavier.fontaine](https://discuss.dvc.org/u/xavier.fontaine)\
**Post date:** [November 27, 2024, 10:15am UTC](https://discuss.dvc.org/t/dvc-exp-run-runs-multiple-experiments-by-default/2320/1 "2024-11-27T10:15:20Z")

</div>

I am puzzled by the behavior of `dvc exp run`. In particular, I read:

> When called with no arguments, this is equivalent to `dvc repro` followed by `dvc exp save`.

([source](https://dvc.org/doc/command-reference/exp/run))

But I find the behaviour of `dvc exp run` to differ widely from that of `dvc repro`, and I do not understand the underlying logic of the former.

When running `dvc exp run --force`, dvc reproduces **multiple** experiments in a row, not just one.

- The first experiment uses the workspace (configuration, code).
- The next experiments seem to check out the workspace to commits and runs that `dvc.yaml`.

So something like

```bash
> dvc exp run --force

Reproducing experiment 'yucky-huia'
Building workspace index |8.00 [00:00, 114entry/s]
Comparing indexes |26.0 [00:00, 449entry/s]
Applying changes |13.0 [00:00, 1.04kfile/s]
[some code being executed]
Updating lock file 'dvc.lock'
[some code being executed]
Reproducing experiment 'obese-mana'
[The reproduction]
[etc.]

```

On the other hand, `dvc repro` runs an experiment using the current workspace.

Could someone help me get what `dvc exp run` is trying to do? Where is that behavior documented? 🙏

The output of `dvc doctor`, for reference:

```bash
❯ dvc doctor
DVC version: 3.57.0 (pip)
-------------------------
Platform: Python 3.10.14 on Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-with-glibc2.35
Subprojects:
        dvc_data = 3.16.7
        dvc_objects = 5.1.0
        dvc_render = 1.0.2
        dvc_task = 0.40.2
        scmrepo = 3.3.8
Supports:
        http (aiohttp = 3.11.3, aiohttp-retry = 2.9.1),
        https (aiohttp = 3.11.3, aiohttp-retry = 2.9.1),
        s3 (s3fs = 2024.10.0, boto3 = 1.35.36)
Config:
        Global: /home/xavier/.config/dvc
        System: /etc/xdg/dvc
Cache types: hardlink, symlink
Cache directory: ext4 on /dev/sdc
Caches: local
Remotes: s3
Workspace directory: ext4 on /dev/sdc
Repo: dvc, git
Repo.site_cache_dir: /var/tmp/dvc/repo/76d5de47ff46d22ee75c2a81e6d464a4

```

---

<div class="post-metadata">

**Author:** ![shcheklein](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.dvc.org/shcheklein/32/173_2.png) [@shcheklein](https://discuss.dvc.org/u/shcheklein)\
**Post date:** [November 28, 2024, 6:54pm UTC](https://discuss.dvc.org/t/dvc-exp-run-runs-multiple-experiments-by-default/2320/2 "2024-11-28T18:54:01Z")

</div>

Hmm, that’s weird. It should not be running two experiments at once? Could you possible try to create a minimal reproducible example?

---

<div class="post-metadata">

**Author:** ![xavier.fontaine](https://avatars.discourse-cdn.com/v4/letter/x/9de053/32.png) [@xavier.fontaine](https://discuss.dvc.org/u/xavier.fontaine)\
**Post date:** [December 4, 2024, 8:02am UTC](https://discuss.dvc.org/t/dvc-exp-run-runs-multiple-experiments-by-default/2320/3 "2024-12-04T08:02:19Z")

</div>

@shcheklein  
Thank you for your reply 🙏

> Could you possible try to create a minimal reproducible example?

I will try, but don’t know whether I’ll succeed (the problem popped out of nowhere, not sure why).

I think the issue started to occur after using `dvc push/pull --run-cache`. I can try along that line.
