dvc
dvc copied to clipboard
top-level params/metrics/plots/artifacts: support templating and foreach
Templating and foreach are only supported in stages in dvc.yaml. It would be nice to have support in top-level params, metrics, plots, and artifacts.
@skshetry pointed out that these should probably be separate issues since templating should be straightforward (syntax doesn't change, reuse existing top-level vars), whereas foreach will require new syntax (for one thing, stages are dicts whereas other top-level fields are lists). When we get to these, we can split them up.
I am not sure I fully understand what foreach means for top-level metrics/params/plots
yeah, I don't understand it as well. We are looking for a way to make it DRY, and less repeatable. Think of cases where the stages are already created with foreach and looped.
I proposed adding support for regex/globbing or directory params/metrics supports as an alternative too.
Also see https://iterativeai.slack.com/archives/CB41NAL8H/p1667074000124059.
Globbing (also for deps, out, etc.) would be incredibly useful!
Would this feature be added any time soon?
There's a lack of consistency between the stage plots and top level plots. Stage plots support templating but not the functionality of top level plots. Will have to hard code paths for the plots for the moment.
@paluchasz Unfortunately, there's no estimate now for this feature. Do you use dvclive or is it possible for you to do so? That would write the paths to plots out for you automatically.
Let's include all top-level sections in this issue and close #9999 as a duplicate.
I am planning on working on this, this week.
Just wanted to +1 the glob patterns request