Repository: iterative/dvc

Issue #9260: exp list: does not show new experiments
Created: 2023-03-28T13:33:56Z
Bug Report
Description
When the terminal is killed while dvc exp run is executing, the ref .git/refs/exps/exec/EXEC_BASELINE is not removed.
Then when a git commit is made, git might pack the references to optimize performance.
Now, dvc exp list is stuck with the list of experiments before the commit and will not update when new experiments are run.
This also affects the experiments table in the vscode extension.
Reproduce

git init
dvc init
dvc stage add -n prepare -d prepare.py python prepare.py
create file prepare.py and write a program that takes some time (e.g. time.sleep(10))
git add .
git commit -m "commit 1"
dvc exp run
while running: Kill the terminal (not via ctrl+c but by closing the terminal)
edit prepare.py (to make dvc exp run execute the pipeline again)
git add .
git commit -m "commit 2"
git pack-refs --all: when committing, git sometimes does "git pack-refs" for optimization. It can happen right here. To simulate the automatic packing, run git pack-refs --all
dvc exp run
dvc exp list

Expected
dvc exp list should show the experiment from 13. Instead, it returns nothing.
It only shows the experiment with dvc exp list -A
Environment information
Output of dvc doctor:
$ dvc doctor
DVC version: 2.38.1 (exe)
---------------------------------
Platform: Python 3.10.9 on Windows-10-10.0.19045-SP0
Subprojects:

Supports:
        azure (adlfs = 2022.11.2, knack = 0.10.1, azure-identity = 1.12.0),
        gdrive (pydrive2 = 1.15.0),
        gs (gcsfs = 2022.11.0),
        hdfs (fsspec = 2022.11.0, pyarrow = 10.0.1),
        http (aiohttp = 3.8.3, aiohttp-retry = 2.8.3),
        https (aiohttp = 3.8.3, aiohttp-retry = 2.8.3),
        oss (ossfs = 2023.1.0),
        s3 (s3fs = 2022.11.0, boto3 = 1.24.59),
        ssh (sshfs = 2022.6.0),
        webdav (webdav4 = 0.9.8),
        webdavs (webdav4 = 0.9.8),
        webhdfs (fsspec = 2022.11.0)
Cache types: <https://error.dvc.org/no-dvc-cache>
Caches: local
Remotes: None
Workspace directory: NTFS on C:\
Repo: dvc, git

Duplicate issue #9744: exp list/show: --rev HEAD shows nothing, but using commit SHA of HEAD works
Created: 2023-07-18T17:27:27Z
Bug Report

Description

Command dvc exp list [--rev HEAD] does not show any experiments, but when using the explicit Git commit SHA as --rev argument, it displays the expected list of experiments. Same for dvc exp show. This could be related to #9260.
My HEAD commit also has refs refs/exps/exec/EXEC_HEAD and refs/exps/apply/ORIG_HEAD as I have "rebased" the experiments onto the current main HEAD commit using dvc exp apply followed by dvc exp save.
Reproduce


Expected

After having run (dvc exp run) or saved (dvc exp save) experiments, I would expect dvc exp list and dvc exp show to display those experiments without any --rev argument or when given --rev HEAD instead of --rev $(git rev-parse HEAD).
Environment information

Output of dvc doctor:
$ dvc doctor
DVC version: 3.5.1 (conda)
--------------------------
Platform: Python 3.10.6 on Linux-3.10.0-1127.8.2.el7.x86_64-x86_64-with-glibc2.17
Subprojects:
        dvc_data = 2.5.0
        dvc_objects = 0.23.0
        dvc_render = 0.5.3
        dvc_task = 0.3.0
        scmrepo = 1.0.4
Supports:
        http (aiohttp = 3.8.4, aiohttp-retry = 2.8.3),
        https (aiohttp = 3.8.4, aiohttp-retry = 2.8.3),
        s3 (s3fs = 2023.6.0, boto3 = 1.26.76)
Config:
        Global: /home/aschuh/.config/dvc
        System: /etc/xdg/dvc
Cache types: hardlink, symlink
Cache directory: xfs on /dev/sda1
Caches: local
Remotes: s3, s3
Workspace directory: xfs on /dev/sda1
Repo: dvc (subdir), git
Repo.site_cache_dir: /var/tmp/dvc/repo/764b1d03f8b416f032df6c50c3809e7f
Additional Information (if any):

Closing comment (2023-07-20T01:02:58Z): Closing as duplicate of #9260