Skip to content

exp run: git ignored files committed to experiments #8113

@mattseddon

Description

@mattseddon

Bug Report

Description

I was working on a new command in the extension where you can "share an experiment". I got some surprising results in that the experiment's input data that is tracked by DVC and listed in .gitignore files was committed into Git. I discovered this when I sent the branch to the remote and opened a PR.

Reproduce

  1. run several checkpoint experiments in the workspace.
  2. pick one of the experiments.
  3. dvc exp branch [exp-name] [branch-name]
  4. dvc exp apply [exp-name]
  5. dvc push
  6. git push origin [branch-name]
  7. create a PR for the branch pushed to origin. Tracked data will be shown in the PR. e.g Shared branch vscode-dvc#2156

Expected

exp branch does not commit DVC tracked/git ignored data.

Environment information

Output of dvc doctor:

$ dvc doctor
DVC version: 2.16.0 (pip)
---------------------------------
Platform: Python 3.8.9 on macOS-12.5-arm64-arm-64bit
Supports:
        webhdfs (fsspec = 2022.5.0),
        http (aiohttp = 3.8.1, aiohttp-retry = 2.5.1),
        https (aiohttp = 3.8.1, aiohttp-retry = 2.5.1),
        s3 (s3fs = 2022.5.0, boto3 = 1.21.21)
Cache types: reflink, hardlink, symlink
Cache directory: apfs on /dev/disk3s1s1
Caches: local
Remotes: https
Workspace directory: apfs on /dev/disk3s1s1
Repo: dvc (subdir), git

Additional Information (if any):

Could definitely be related to the way a branch is created for checkpoint experiments. I have not tested to see if the same problem occurs with non-checkpoint experiments.

Metadata

Metadata

Assignees

Labels

A: experimentsRelated to dvc expawaiting responsewe are waiting for your reply, please respond! :)product: VSCodeIntegration with VSCode extension

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions