treeverse / treeverse/dvc

Don't block parallel stage execution for stages with an unchanged common dependency

Open
#11,054 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
15.9k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

I have a stage, say generateInitialConditions, which generates the initial conditions, say initial_conditions.json needed for two simulation stages sim001 and sim002. If I dvc repro sim001 in one terminal, and then dvc repro sim002 in another terminal, I get "Error: failed to reproduce 'generateInitialConditions': initial_conditions.json is busy, it is blocked by (PID #######) c:\users<username>.local\bin\dvc repro sim001"
Given that initial_conditions.json was already up-to-date so generateInitialConditions was going to be skipped anyway, I don't see why these two stages couldn't have been run in parallel.

Desired behaviour: when running dvc repro <stage>, if a dependency of a stage has not changed, do not require that dependency to be unlocked to run the stage.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the dvc repro command and reproduce the issue with two terminals running sim001 and sim002 when their shared generateInitialConditions dependency is unchanged. Trace the lock decision for unchanged dependencies; done means both downstream stages can run concurrently without the shared dependency being reported as busy.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, data-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.