应用管道到多个源文件。

huangapple go评论90阅读模式
英文:

DVC - apply a pipeline to multiple source files

问题

我有100个源文件要通过管道处理。有没有一种循环遍历列表的模式,每次为同一个管道生成新的源文件和输出文件名?

谢谢!

英文:

I have 100 source files to push through a pipeline. Is there a pattern for looping over a list, generating a new source and output file name each time for the same pipeline?

Thanks!

答案1

得分: 1

我能为您翻译这些代码部分:

dvc.yaml

stages:
  example:
    foreach: ${some_param}
    do:
      cmd:
        - echo ${item}

params.yaml

some_param:
  - files/file1
  - files/file2
  - files/file3
英文:

If you can elaborate more, that would be helpful, but maybe something like this is what you are looking for?

dvc.yaml

stages:
  example:
    foreach: ${some_param}
    do:
      cmd:
        - echo ${item}

params.yaml

some_param:
  - files/file1
  - files/file2
  - files/file3

huangapple
  • 本文由 发表于 2023年5月22日 22:25:03
  • 转载请务必保留本文链接:https://go.coder-hub.com/76307198.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定