Skip to content

exp run: doesn't work with submodule as dependency #7186

@woodshop

Description

@woodshop

Bug Report

Description

dvc exp run fails and dvc repro runs successfully when a cmd is executed from inside of a submodule and the submodule is included as a dependency.

Reproduce

Set Up:

mkdir test
cd test

mkdir submodule
cd submodule
git init
echo "cp ../data/a.txt ../models/b.txt" > run.sh
git add run.sh
git commit -m "initial commit"

cd ..
mkdir main
cd main
git init
dvc init
dvc config cache.type=hardlink,symlink,copy
git submodule add ../submodule src
mkdir data
echo "test" > data/a.txt
mkdir models
dvc stage add -n cp -w src -d ../src -d ../data/a.txt -o ../models/b.txt bash run.sh
dvc repro
git add .
git commit -m "initial commit"

This works
dvc repro -f

This fails:
dvc exp run -f

This also fails:
dvc exp run -f --temp

Expected

dvc repro and dvc exp run run and succeed similarly.

Environment information

Output of dvc doctor:

$ dvc doctor

DVC version: 2.9.2 (pip)
---------------------------------
Platform: Python 3.8.10 on Linux-5.11.0-1021-aws-x86_64-with-glibc2.29
Supports:
	hdfs (fsspec = 2021.10.1, pyarrow = 5.0.0),
	webhdfs (fsspec = 2021.10.1),
	http (aiohttp = 3.8.1, aiohttp-retry = 2.4.6),
	https (aiohttp = 3.8.1, aiohttp-retry = 2.4.6),
	s3 (s3fs = 2021.10.1, boto3 = 1.17.106)
Cache types: hardlink, symlink
Cache directory: lustre on 172.16.38.30@tcp:/skl3jbmv
Caches: local
Remotes: s3
Workspace directory: lustre on 172.16.38.30@tcp:/skl3jbmv
Repo: dvc, git

Additional Information (if any):
There's an error in the verbose output that indicates

ERROR: unexpected error - invalid data in index - invalid entry

Metadata

Metadata

Assignees

Labels

A: experimentsRelated to dvc expbugDid we break something?p3-nice-to-haveIt should be done this or next sprint

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions