dvc icon indicating copy to clipboard operation
dvc copied to clipboard

params/metrics/exp diff: consistent output

Open jorgeorpinel opened this issue 4 years ago • 17 comments

Extracted from https://github.com/iterative/dvc.org/pull/2200#discussion_r581757584

  • metrics diff currently shows old, new, change
  • params diff currently shows old, new
  • exp diff currently shows new, change

Should they all be Old, New, Change? (Possibly with some flag to skip Old or Change)

jorgeorpinel avatar Feb 24 '21 18:02 jorgeorpinel

cc @dberenbaum

jorgeorpinel avatar Feb 24 '21 18:02 jorgeorpinel

Thanks, @jorgeorpinel! Let's refer this back to #5392.

Should they all be Old, New, Change?

👍

dberenbaum avatar Feb 24 '21 20:02 dberenbaum

What do you mean @dberenbaum? 🙂

jorgeorpinel avatar Feb 25 '21 05:02 jorgeorpinel

BTW @pmrowla do you know if we've considered merging dvc params/metrics/exp diff into a single command (e.g. dvc compare)? Or maybe as flags of dvc diff.

jorgeorpinel avatar Feb 25 '21 05:02 jorgeorpinel

@jorgeorpinel the idea has come up before as something that we could consider doing in the future, but not seriously considered yet

pmrowla avatar Feb 25 '21 05:02 pmrowla

What do you mean @dberenbaum? 🙂

I just wanted to mention it so we have all of these UI issues linked in that one issue. No other action needed!

dberenbaum avatar Feb 25 '21 13:02 dberenbaum

Was about to comment this in #5392 (haven't seen any other related issues). I think that the terms Old / New used in diff sometimes could be confusing, given that users can pass refs in any order.

For example they could run dvc metrics diff {newer commit hash} {older commit hash} and the table will show the values of the newer commit under the column Old.

daavoo avatar Jul 21 '21 06:07 daavoo

cc @skshetry

I'd prefer having the ref names instead of Old and New.

dberenbaum avatar Jul 21 '21 17:07 dberenbaum

Two questions:

A) Should Change be included by default ??

I might be biased but, in my personal experience (and current docs examples), the "Change" value is kind of awkward most of the times.

I would vote for hiding it by default and making it optional.

B) Should there be an option to hide a_rev (previously "Old") at all?

IMO the only case where it could make sense to not show a_rev is when calling dvc {X} diff {b_rev} (where a_rev is set to HEAD by default.)

Maybe instead of a flag for opting out a_rev, we could just hide it when equals to HEAD.

daavoo avatar Oct 29 '21 18:10 daavoo

@daavoo @jorgeorpinel Is there anything left to do on this issue?

dberenbaum avatar Nov 15 '21 18:11 dberenbaum

@daavoo @jorgeorpinel Is there anything left to do on this issue?

Showing Change in dvc params diff (If we agree that Change should be showed by default)

daavoo avatar Nov 15 '21 19:11 daavoo

Not sure, I'd expect some PR to close this at some point but feel free to do so manually when you think it's addressed. Thanks

jorgeorpinel avatar Nov 15 '21 19:11 jorgeorpinel

Params are not always numeric, so I'm not sure what should be shown in Change. Maybe it's a boolean for non-numeric params?

I agree that Change is not generally something I find that useful, but I also don't see it as really harmful.

dberenbaum avatar Nov 15 '21 20:11 dberenbaum

Params are not always numeric, so I'm not sure what should be shown in Change. Maybe it's a boolean for non-numeric params?

We are showing Change in the params section of dvc exp diff treating them as scalars https://dvc.org/doc/command-reference/exp/diff#examples 🤷

daavoo avatar Nov 15 '21 21:11 daavoo

Ah, okay, it's handled like:

$ dvc exp diff
Path         Param    HEAD    workspace    Change
params.yaml  foo      a       b            diff not supported

I'd vote to keep Change since I see little harm and it seems like a less breaking change, but I don't feel that strongly about it.

dberenbaum avatar Nov 15 '21 21:11 dberenbaum

Ah, okay, it's handled like:

$ dvc exp diff
Path         Param    HEAD    workspace    Change
params.yaml  foo      a       b            diff not supported

I'd vote to keep Change since I see little harm and it seems like a less breaking change, but I don't feel that strongly about it.

We could improve the non scalar support by replacing the 'diff not supported' with bool resulting of direct comparisson

daavoo avatar Nov 15 '21 23:11 daavoo

To clarify, what's left to close the issue is:

  • Showing Change in dvc params diff

daavoo avatar Aug 01 '22 10:08 daavoo

If this is still open, I would like to take it.

mesejo avatar Jul 20 '23 16:07 mesejo

If no one is currently working on this, I would like to take it.

filippopellizzari avatar Feb 25 '24 20:02 filippopellizzari