Dvc: metrics show/diff: should it pick up untracked changes? [qa]

Created on 7 Apr 2020  路  1Comment  路  Source: iterative/dvc

位 dvc version
DVC version: 0.92.0
Python version: 3.7.5
Platform: Windows-10-10.0.18362-SP0
Binary: True
Package: exe

# In a DVC repo:
位 echo 3 > metric
位 dvc add metric
位 dvc metrics add metric
位 dvc metrics show  # DOES shows uncommitted metric value
        metric: 3
位 dvc metrics diff  # Same
 Path    Metric   Value         Change
metric            3       diff not supported
位 git commit -m 'add raw metric'

位 echo 4 > metric
位 dvc metrics show  # Does NOT show uncommitted change
        metric: 3
位 dvc metrics diff  # Same...
No changes.

This is because the change in file metric hasn't been committed to cache, I guess. But it feels intuitive that show/diff would read the actual file in the workspace and not the cached one (at least diff? same as in Git).

We may have gone over this scenario before during the original PR so apologies if I'm going back to a solved discussion, just want to make sure it's not a bug.

To show the change, you have to

位 dvc commit -f metric.dvc
位 dvc metrics show
        metric: 4
位 dvc metrics diff
 Path    Metric   Value   Change
metric            4       1
bug

Most helpful comment

Related https://github.com/iterative/dvc/issues/3386 - all of them should behave the same way indeed 馃憤

>All comments

Related https://github.com/iterative/dvc/issues/3386 - all of them should behave the same way indeed 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

analystanand picture analystanand  路  3Comments

ghost picture ghost  路  3Comments

mfrata picture mfrata  路  3Comments

siddygups picture siddygups  路  3Comments

mdscruggs picture mdscruggs  路  3Comments