Skip to content

Adding multiple metrics files at once #2973

@FredericoCoelhoNunes

Description

@FredericoCoelhoNunes

Hello,

my current ML project runs a DVC pipeline which trains a model for several different segments of the data, and produces a metrics file for each one.
I want to be able to track how these metrics evolve over time; however, the segments of data that are evaluated in each run depend on some parameters on the first step of the pipeline, and so the number of output metrics files changes every time I run the pipeline.

I have tried several approaches:

  • adding -m metrics to my DVC run command, where metrics/ is a folder where I store all my metrics files. This worked, but when calling dvc metrics show -a -R it simply showed the DVC file for that folder, instead of parsing the individual metrics.
  • Using a wildcard -m metrics/* - this simply doesn't work.
  • Setting the metrics directory as an output with -o, and then adding each file as a metric using a script loop: I get the following error ERROR: failed to add metric file 'metrics/metric-1.json' - unable to find DVC-file with output 'metrics/metric-1.json

I am out of ideas! Is this functionality supported, or do I need to have a fixed number of metrics files for each pipeline?

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestRequesting a new featurep2-mediumMedium priority, should be done, but less important

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions