Skip to content

run: run is computing checksums even though --no-exec is specified #5368

@Honzys

Description

@Honzys

Bug Report

run: run cache is not ignored when --no-exec

Description

When you specify --no-exec param, dvc run command should be treated asi if the --no-run-cache was also specified. I guess it makes no sense to check the cache when --no-exec is toggled, or am I wrong?

The problem is when I run dvc run --no-exec ... with dependency pointing to a large folder, it takes a long time to execute this command. Also after the stage is created and I actually want to run the stage using dvc repro it takes a long time to execute that command too.

Our use-case is that we generate all the stages with --no-exec param before we run it for real. If we somehow change the pipeline we would rerun the "generation of all stages with --no-exec param" and then again run it for real after it's refreshed.

Would it makes sense to set the --no-run-cache to True when --no-exec is specified? Or am I overlooking something?

Thank you very much !

Reproduce

Example:

  1. Create a large folder, ideally with lots of images
  2. dvc run --no-exec --force --deps folder_path -n stage # This should be done in instance
  3. dvc repro stage # This should take some time to compute checksum for dependencies
  4. dvc run --no-exec --force --deps folder_path -n stage # This should be done in instance (but it actually will take some time)

Expected

I would expect that steps 2 and 4 would be completed aproximately in the same amount of time.

Environment information

Output of dvc version:

DVC version: 1.11.13 (pip)
---------------------------------
Platform: Python 3.6.8 on Linux-4.18.0-259.el8.x86_64-x86_64-with-centos-8
Supports: http, https, s3
Cache types: reflink, hardlink, symlink
Cache directory: xfs on *********
Caches: local
Remotes: s3
Workspace directory: xfs on *********
Repo: dvc, git

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting responsewe are waiting for your reply, please respond! :)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions