How to change metrics computation and recompute

Hi all,
I trained several models and computed a simple metrics summary for each of them. Now, those models (and their corresponding metrics.json files) are versioned by dvc and git and there is a git tag associated with each model.
Having the models trained and stored, I would like to enrich the metrics summary and go back and recompute it for each model – and store it in git as with the simple summary. This means the last part of the pipeline, say, will be changed and I would like to run dvc repro again. Is there a simple way of recomputing the metrics for all models (that is for all tags)?

Thank you,

Hi @michal.najman
So what you are looking for is probably dvc repro
If you have only modified the code responsible for metrics calculation, dvc should detect that and recalculate only metrics. If you want to be sure, you can explicitly tell dvc to reproduce metrics stage only with --single-item (eg dvc repro --single-item metrics_calc.dvc) param. I am afraid that currently, we do not support repro for multiple git revisions, which would probably have to be done manually. Maybe you want to create feature request on GitHub, with a short description how would you expect that to work?

1 Like