Skip to content

dvc plots diff: use a descriptive filename instead of plots.html by default #4158

Closed
@natikgadzhi

Description

@natikgadzhi

Current implementation

By default, dvc plots diff will put the plot in a boilerplate html code into $(pwd)/plots.html. If I run dvc plots diff -x another-axis -y another-metric, it'll overwrite the plots.html.

You can pass dvc plots diff ... -out path/to/file.html and it would write to the provided path, however this requires the user to think about the path they want to use for plots, if they want to keep them.

Note: it's fair to say that I myself probably don't want to keep those plots files, I keep deleting those, so this feature would be a very theoretical improvement for an abstract user.

Proposal

Provide a default output file name that is unique to the commits that are being compared, and the metrics that are being plotted, like this:

`dvc-plots-{x}-{y}-{sha1}-{sha2}.html.

The command should still accept the -out option that should override that default with whatever user provided.

If you think this is an okay idea, I'd be willing to implement and test this and do a pull request ;-) WDYT?

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting responsewe are waiting for your reply, please respond! :)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions