metrics: diff: make table more intuitive (#4655)

* metrics: diff: make table more intuitive

Currently we have a "diff not supported" marker in the table, that is
used whenever dvc is not able to diff the values (e.g. no old one, no
new one or format error). It is quite ugly and it is much more intuitive
to just show both old and new values and now show that marker at all, as
if there is no old/new value it is intuitive that we can't calculate the
change. Next step is to add old/new "bad format"/etc markers for
unsupported types or malformed/missing metric files.

E.g., before:

```
Path          Metric    Value    Change
metrics.json  foo       1.2      diff not supported
```

after this PR:

```
Path          Metric    Old    New    Change
metrics.json  foo       None   1.2
```

* metrics/params: use em dash in diff table
This commit is contained in:
Ruslan Kuprieiev
2020-10-05 19:37:34 +03:00
committed by GitHub
parent d0e1c88792
commit 52fe76cefc
5 changed files with 39 additions and 70 deletions
+1 -1
View File
@@ -97,7 +97,7 @@ def table(header, rows, markdown=False):
tablefmt="github" if markdown else "plain",
disable_numparse=True,
# None will be shown as "" by default, overriding
missingval="None",
missingval="—",
)
if markdown: