Dvc: metrics: show: support multiple targets

Created on 14 Jan 2019  路  8Comments  路  Source: iterative/dvc

Currently, it only supports one single target.

From Al on discord:

this works fine: dvc metrics show ml_model/level_1/scores.json
this doesn't: dvc metrics show ml_model/level_{1,2}/scores.json
Error: unrecognized arguments: ml_model/level_2/scores.json
c8-full-day enhancement good first issue help wanted p1-important

All 8 comments

what's the purpose of doing dvc metrics show for a single path instead of using cat?

cat ml_model/level_{1,2}/scores.json ?

what about dvc metrics show ml_model/ ?

related: https://github.com/iterative/dvc/issues/2318

To run it with -a or -T for example?

Or metrics show -R dir another example for a single target case

Indeed, @shcheklein :+1:

@efiop , will the same --xpath be applied to the multiple targets?

Also, the --type option looks more like a filter ("select all the metrics where type is csv") than something that will modify the "show behavior" -- it is not that clear, we might need to edit the help message. I will prefer removing that option from metrics show and leave it under metrics modify.
What do you think, @efiop ?

will the same --xpath be applied to the multiple targets?

@mroutis yes, this is how it's working now (if no targets are specified and -x or -t are provided). Changing this would be a separate ticket I would say.

it is not that clear, we might need to edit the help message

It would be great. The goes for docs. I would keep the option itself, even though I agree it's quite strange to apply the type. One use case that comes to my mind is when you have a history of metric and DVC-files in git that do not have type specified. You would need to provide the type to apply it retrospectively.

@efiop @mroutis update docs please :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

gregfriedland picture gregfriedland  路  3Comments

ghost picture ghost  路  3Comments

anotherbugmaster picture anotherbugmaster  路  3Comments

GildedHonour picture GildedHonour  路  3Comments