Skip to content

Nested matrix substitution #9948

Open
Open
@kosmitive

Description

@kosmitive

Sometimes evaluating a certain metric calculations can take up some time. So we want to cache these results using dvc. For that we consider the following param.yaml file

experiments:
  experiment_a:
    metrics:
      metric_a_1:
         idx: <str>
         kwargs: <dict>
      [...]
  experiment_b:
    metrics:
      metric_b_1:
         idx: <str>
         kwargs: <dict>
      [...]

combined with the dvc.yaml file

stages:
  dispatch_experiment:
    matrix:
      experiment: ${experiments}
      metric: ${experiments.${item.experiment}.metrics}
   cmd: python -m scripts.dispatch_experiment
      --experiment-name ${item.experiment}
      --metric-name ${item.metric}
   outs:
      - ${item.experiment}/${item.metric}.csv

in order to make the looping of matrix notation more flexible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    p3-nice-to-haveIt should be done this or next sprint

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions