Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple metrics in one file #1682

Closed
guysmoilov opened this issue Mar 3, 2019 · 8 comments
Closed

Multiple metrics in one file #1682

guysmoilov opened this issue Mar 3, 2019 · 8 comments
Labels
feature request Requesting a new feature p3-nice-to-have It should be done this or next sprint

Comments

@guysmoilov
Copy link
Contributor

I think being able to define a list of metric type + xpath for a single output file will come in VERY handy. An additional "metric name" property would also help a lot when you are actually looking back at your metrics and trying to decide what to do about them.

As an example of why this should come in handy, check out the following repo:
https://dagshub.com/Guy/uri_nlp_ner_workshop/src/175bbd99d7dcc833049429d04334e7afe5763340

The training stage has a bunch of metric outputs, and I'm left with one of two choices:

  1. Dump them all in one big json (or other) file, and treat it as one big raw metric. That means no good visualization.
  2. Dump each one in its own json file, as I did in the linked repo. This allows visualization but is very cumbersome, not to mention it makes the DAG blow up and requires the dvc run command to be very long and tightly coupled to the training code.
@efiop
Copy link
Contributor

efiop commented Mar 3, 2019

Hi @guysmoilov !

Great idea! This can be solved in a pretty streight forward way by making metric: field in our dvc files to support lists. And also there should be respective CLI changes for dvc metrics and dvc run, surely. Is this something that you would be interested to submit a PR for? 🙂

Thanks for the feedback!

@efiop efiop added the feature request Requesting a new feature label Mar 3, 2019
@guysmoilov
Copy link
Contributor Author

@efiop Yeah, I'll start working on a PR when I have the chance

@schlichtanders
Copy link

@guysmoilov what is the status for this?

getting started with dvc, this is the first unexpected missing feature I came accross

@efiop efiop added p3-nice-to-have It should be done this or next sprint and removed p4 labels Sep 30, 2019
@guysmoilov
Copy link
Contributor Author

@schlichtanders Unfortunately, I haven't yet had time. It would be interesting to hear how you envisioned this working, before you were surprised.

@schlichtanders
Copy link

dvc already supports json structures and others in metric files

it is natural that such a json structure can have multiple metrics

{
"score1": 1.2312
"score2": -12300.122233
}

it would be great if we could seamlessly work with both metrics in this json, without overwriting the other.
(or is it already possible and I misunderstood this issue?)

@guysmoilov
Copy link
Contributor Author

@schlichtanders AFAIK, you understood correctly.

@dmpetrov
Copy link
Member

Now we support only JSON with multiple metrics. DVC understand the JSON structure and does proper metrics diff.

As far as I understand, this solves the issue. Closing. Please met know if something else is needed.

@efiop
Copy link
Contributor

efiop commented May 13, 2020

JSON and yaml 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requesting a new feature p3-nice-to-have It should be done this or next sprint
Projects
None yet
Development

No branches or pull requests

4 participants