-
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
docs: doc repro --glob and update targets arg info. #1983
Conversation
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.
This looks great @skshetry ... let's just find a place to put it.
For now section will do, but we can consider doing something standard here ... any good ideas that will make it easier to navigate for users?
With `--glob`, the targets are used as a pattern to match stages in the | ||
dvc.yaml file (example: `train-*`). | ||
|
||
A stage from a dvc.yaml in a different directory can be specified using a path |
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.
I wonder if in this case it's easier to just show 5 or more examples with their meaning (instead of explaining :
explicitly)?
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.
Yeah, it might be too much to read if you just need to get it done. But, I think it's good to also layout the spec of it, so I added an example for each scenario.
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.
yeah, spec is good, and I saw your examples (that's why I'm actually suggesting to do emphasis on them) the question is - should the spec be part of the examples explanation? this way most people with get the idea from what they see, almost immediately, and they can still read if needed.
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.
That sounds good. Will make changes later in the day. Thanks.
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.
easier to just show 5 or more examples with their meaning (instead of explaining :
it might be too much to read if you just need to get it done
It's good to have the spec thoough. I can probably help summarize this text when it's ready.
- Consider instead adding an actual Example about wildcards in addition to this (and link to it from here).
This comment has been minimized.
This comment has been minimized.
This has been fixed. Please merge |
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.
I'd reorder these paragraphs a little so that everything --glob is together, like this
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 this is really good.
Side-note guys: I'm a bit concerned about the --glob
name for UX reasons. See iterative/dvc#4976 (comment).
Moved to iterative/dvc#4816 (comment)
OK so it looks like we have all the info we need for this doc. The Q is whether you can help move stuff around and address some of the feedback above @skshetry please lmk so we can plan to finish this up when ready. Thanks |
@jorgeorpinel, this should be ready, I don't have anything to add. |
This comment has been minimized.
This comment has been minimized.
`dvc repro` does not run `dvc fetch`, `dvc pull` or `dvc checkout` to get data | ||
files, intermediate or final results (except if the `--pull` option is used). | ||
|
||
By default, this command checks all [pipeline](/doc/command-reference/dag) |
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.
all not relevant?
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.
This paragraph is redundant (with the new targets text a well as the first p in the Description) and slightly wrong (but that will be corrected for #2024). Removing it aims to make the Description shorter so that the whole doc doesn't grow too much as we introduced the targets text.
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.
But I can easily stash the change if you prefer and leave it for later. Lmk.
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.
Yes, let's make PRs focused if possible.
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.
I expect some changes here, but it probably should be only the paragraph about targets?
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.
OK, I reverted this. I'm afraid that if we just keep adding paragraphs without reviewing the context we'll end up with lots of redundancy and a text that may be unnecessary long.
- `-R`, `--recursive` - determines the stages to reproduce by searching each | ||
target directory and its subdirectories for stages (in `dvc.yaml`) to inspect. | ||
If there are no directories among the targets, this option is ignored. | ||
- `-R`, `--recursive` - looks for `dvc.yaml` files to reproduce in any |
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.
not relevant?
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.
This is directly related to repro targets
. It used to read "determines the stages ... by searching ... for stages". Isn't this a good opportunity to fix that? TBH I already have a mountain of stashed changes so anything I can't get into existing PRs will probably get lost until we happen to notice it again 🙁
using by using a colon `:` following the path to that file. E.g. | ||
`models/dvc.yaml:prepare` | ||
|
||
- Files and directories tracked by **`.dvc` files** given as `targets` are |
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.
let's skip this 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.
Yes! I would like that too but are you sure? The help output (and Synopsis above) mention .dvc files so if we don't explain it here, it'd be up to the user to assume what will happen.
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.
Synopsis is a copy/paste from DVC which should probably change, so, let's not complicate. The point is not cover everything to the very small detail - the point is to focus on important stuff and convey it in the simplest possible format (e.g. people don't read long texts, unless they want to dive in)- thus short self-explainable examples are better
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.
Agree. Removed info about .dvc file targets from this ref.
Different things can be provided as targets depending on the flags used (more | ||
details in each option), namely: | ||
|
||
- With `-R` you can provide directory paths to search for `dvc.yaml` files in, | ||
recursively. | ||
- With `--glob`, you can use special patterns (using wildcards) to match | ||
groups of stage names. | ||
|
||
- `-R`, `--recursive` - looks for `dvc.yaml` files to reproduce in any | ||
directories given as `targets`, and in their subdirectories. If there are no | ||
directories among the targets, this option has no effect. | ||
|
||
- `--glob` - causes the `targets` to be interpreted as wildcard |
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.
Added -R and --glob to targets
but also moved those options up right next to targets, so I still think it seems a bit redundant.
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.
Suggestion:
Keep only
Different things can be provided as targets depending on the flags used (more
details in each option), namely:
then a list of examples:
dvc reporo -R pipeline
- will look recursively into ....dvc reporo --glob ...
- will execute stages that match patterndvc repro
- will find dvc.yaml(s) and execute all stages
it's way simpler to grasp the idea, no need to read long long text (if some details are need let's try very hard to squeeze them into each item above)
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.
depending on the flags used (more details in each option). Examples: | ||
|
||
- `dvc repro linear/dvc.yaml`: Specific `dvc.yaml` file to reproduce | ||
- `dvc repro -R pipelines/`: Directory path to explore recursively for for |
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.
- `dvc repro -R pipelines/`: Directory path to explore recursively for for | |
- `dvc repro -R pipelines/`: Directory path to explore recursively for |
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.
Oops thanks! Want to send a quick typo fix PR since this is merged?
Fixes #1975. The feature was introduced in iterative/dvc#4976 which was released in 1.11.0.