-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
guide: document matrix in dvc.yaml #4761
Conversation
fixes #4741 upstream PR: iterative/dvc#9725 available since https://github.com/iterative/dvc/releases/3.12.0
Note that templating is supported inside `matrix` and in definition, so you can | ||
reference things defined in `vars` and from your imported file as usual. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by your imported file
? Should we also mention that you can reference params files? It would be great to have a more complete example here (show the vars
section and/or params.yaml
file).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With imported
, I meant vars
loaded from files. But yes, it is confusing. I'll just get rid of it, and replace with an example of vars
from params.yaml. Others should be left to the readers/users I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @skshetry! Nice examples.
Let's at least mention in foreach
that matrix
now provides a more powerful way to define multiple stages in a single entry. I think we should go even further and say that foreach
may be deprecated in future versions, so we recommend using matrix
instead.
Co-authored-by: Dave Berenbaum <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
I'll just recommend for now. Let's get some feedback first. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely not a blocker for this P.R. but #3670 feels now even more important to address.
Too much important info in a place "too hidden"
- _train@cnn-feature1_ | ||
- _train@cnn-feature2_ | ||
- _train@cnn-feature3_ | ||
- _train@xgb-feature1_ | ||
- _train@xgb-feature2_ | ||
- _train@xgb-feature3_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change to a code block like this just to save space? The bullet points take up a lot space.
$ dvc stage list
train@cnn-feature1 Outputs cnn.pkl
train@cnn-feature2 Outputs cnn.pkl
train@cnn-feature3 Outputs cnn.pkl
train@xgb-feature1 Outputs xgb.pkl
train@xgb-feature2 Outputs xgb.pkl
train@xgb-feature3 Outputs xgb.pkl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed the change myself since I don't know how to add a code block in a suggestion, and I'm assuming this isn't a controversial change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @skshetry!
As a follow-up (unless you want to include in this PR), let's also add an example showing how it works with dict unpacking.
I think there are three parts here on how we should decouple:
To me, it feels like matrix example belongs in dict unpacking rather than matrix (which is hidden right now). |
fixes #4741
upstream PR: iterative/dvc#9725
available since https://github.com/iterative/dvc/releases/3.12.0