dvc metrics diff --all: on same branch is empty #10429
Labels
A: metrics
Related to dvc metrics
bug
Did we break something?
p3-nice-to-have
It should be done this or next sprint
Bug Report
Description
Hello,
we found that
dvc metrics diff --all
outputs nothing, ifa_rev
andb_rev
refer to the same git commit. No matter if they are exactly the same or different types of references (HEAD vs branch_name, etc.)Reproduce
dvc metrics diff --all $(git rev-parse --abbrev-ref HEAD) HEAD
Expected
output metrics-diff table with all values with diff = 0.0
Environment information
Output of
dvc doctor
:Additional Information (if any):
Running the debugger, we noticed that metrics/diff.py:diff expects the results of metrics.show() to have the exact rev keys extracted. However metrics/show.py:show uses the brancher to extract the revs to use.
However the brancher groups revs with the same sha and joins them.
This means that when we call
dvc metrics diff --all main main
the brancher would groupmain
andmain
and returnmain,main
.Hence the
repo.metrics.show()
outputs all metrics with the keymain,main
and therepo.metrics.diff()
doesn't find results formain
The text was updated successfully, but these errors were encountered: