Skip to content

dvc diff --show-hash --show-md <commit> shows only file paths, doesn't show md5 hash #4313

@PuneethaPai

Description

@PuneethaPai

Bug Report

dvc diff command has option to --show-hash for debug purpose.

Also the output can be formatted to json or md using --show-json and --show-md option.

Currently --show-hash works fine with normal output and --show-json. It is not showing hash for --show-md.

Example:

Normal Text

~ dvc diff --show-hash b34c3e4
Modified:
    84f9553c..201bc54b  data/models/ensemble/metrics.csv
    f9298672..2db2b3bc  data/models/ensemble/model.gz
    f858c58a..aa2ba7d8  data/models/logistic/metrics.csv
    24d7f7f2..00a3ccdf  data/models/logistic/model.gz

Json format:

~ dvc diff --show-hash --show-json b34c3e4
{"added": [], "deleted": [], "modified": [{"path": "data/models/ensemble/metrics.csv", "hash": {"old": "84f9553c5ddd26baae037290d523446a", "new": "201bc54bbf36d82e5c432da32970effe"}}, {"path": "data/models/ensemble/model.gz", "hash": {"old": "f9298672fe7952354e7bc23cb91fce9b", "new": "2db2b3bc48a82f563001a9da177993ed"}}, {"path": "data/models/logistic/metrics.csv", "hash": {"old": "f858c58a1a5be10510adb64764b610d9", "new": "aa2ba7d85bbfb318bb091f4de1aeaa0e"}}, {"path": "data/models/logistic/model.gz", "hash": {"old": "24d7f7f28c068ce6b6e432391adeef09", "new": "00a3ccdf8f698a4504a2f226ff0052f9"}}]}

Markdown format

~ dvc diff --show-hash --show-md b34c3e4
| Status   | Path                              |
|----------|-----------------------------------|
| modified | data/models/ensemble/metrics.csv  |
| modified | data/models/ensemble/model.gz     |
| modified | data/models/logistic/metrics.csv  |
| modified | data/models/logistic/model.gz     |

Please provide information about your setup

Output of dvc version:

$ dvc version
DVC version: 1.2.2
Python version: 3.8.3
Platform: macOS-10.14.6-x86_64-i386-64bit
Binary: False
Package: pip
Supported remotes: hdfs, http, https, s3
Cache: reflink - supported, hardlink - supported, symlink - supported
Filesystem type (cache directory): ('apfs', '/dev/disk1s1')
Repo: dvc, git
Filesystem type (workspace): ('apfs', '/dev/disk1s1')

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugDid we break something?p2-mediumMedium priority, should be done, but less importantuiuser interface / interaction

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions