-
Notifications
You must be signed in to change notification settings - Fork 1.2k
dvc run with --overwrite-dvcfile is not caching runs #2843
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
Comments
Hi @SdgJlbl ! Sorry for the delay, the notification got lost in the flow 🙁 The command that you are using doesn't have any dependencies, so it is considered as a "callback stage", meaning that it is considered as always changed. Here is the piece of code that is responsible https://github.com/iterative/dvc/blob/0.71.0/dvc/stage.py#L527 and it has been like that for a very long time. Regular "non-callback" stages are still using build cache. Btw, which doc were you talking about? Could you post a link, please? Which dvc version did you upgrade from? |
Thank you for your reply, I have checked the behaviour with a dependency and it is actually behaving as it should. I was refering to the reference documentation https://dvc.org/doc/command-reference/run. It states that :
with no explicit mention that a step with no dependency will never be cached. It was not the case in the version 0.34, where even step with no dependency were cached, hence my tests breaking :) |
@SdgJlbl Thanks for the info! Created iterative/dvc.org#832 to clarify that in the docs. Indeed, 0.34 didn't have that logic in place. Do you still need build cache for no-deps dvc-files? If so, coudl you describe your scenario a bit more, please? |
Actually, in my real pipeline, I never use dvc without dependencies, it was just a use-case popping in some tests where we didn't bother adding a dependency as input (because uh tests ^^). |
Please provide information about your setup
DVC version 0.70.0
Ubuntu 18.04
Installed via pip in a conda env
According to the documentation, and it was the case in previous versions of DVC to the best of my knowledge,
dvc run
should not re-execute the command if nothing changed. It is no longer the case.To reproduce:
The text was updated successfully, but these errors were encountered: