-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
behaves differently than repro
for stages without dependencies
#6718
Comments
For reference, this does also affect You can reproduce this behavior by just running
IMO this is expected behavior for both We could consider changing the current default behavior to always assume stages without deps are |
To clarify, the default behavior for DVC pipelines is to assume that stages are always deterministic by default ( If the stage is non-deterministic (as in this example case where the stage generates a random number), it's on the user to mark it as such with related: #2378 |
There are two separate issues:
|
Bug Report
Description
When I create a stage without dependencies,
dvc exp run
runs it for the first time but doesn't run it in the subsequent runs. We discussed this with @skshetry and he said it's a side effect of usingdvc checkout
+dvc repro
. I believe as the outputs from the previousdvc exp run
are checked out and the stages are not run, as their outputs seem to be identical with those indvc.lock
. This may lead to subtle (or not so subtle) bugs in experimentation.I think stages without dependencies should always run, in both
dvc repro
anddvc exp run
, unless the user explicitly wants otherwise.Reproduce
When you run the following code:
the second
dvc exp run
doesn't run the pipeline, telling:Instead if I use
dvc repro
after deletingoutput1.txt
, the pipeline is run.Expected
I'd expect
dvc exp run
anddvc repro
behave identically for stages without dependencies. I believe a stage without dependency (likestage1
above) is meant to be run always. Otherwise there is no clear condition to run it, and there is no point to create a stage that won't be run.Environment information
This is dvc
2.7.4
.The text was updated successfully, but these errors were encountered: