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
experiments: ignore untracked files #5029
Conversation
Interesting! This needs documenting π (unchecked the box for now). |
This is a great option but IMO the UI isn't very intuitive (using Git operations to determine DVC behavior). How about introducing a new option like |
BTW you can't stage an empty dir so that's still a limitation now, while Lmk if I should open a separate issue about all this... |
You can't stage or add empty dirs in git at all, as git does not track directories, it only tracks files.
This is dangerous for DVC and not a good idea IMO. If users have not explicitly git-ignored things like auth credentials, they will end up committed and in git history. Likewise, if we may also end up shoving things like cached python bytecode or entire venv directories into git history, which is also really bad practice. I'd say this is one of those cases where we have to force the user to be explicit, even if it is inconvenient, because the alternative is providing a convenient way for users inadvertently to do something extremely dangerous. |
That's why I'm suggesting an explicit option, so users have to know what they're doing). We already allow the danger via
I definitely see your points but philosophically I think we don't need to protect users from themselves. |
I'm not so sure about this given that the original reason for this PR was that users trying out the experiments feature ended up being confused as to why |
OK. For now would you like to send a docs update proposal with this info (current behavior)? I can take it over once it's up. |
β I have followed the Contributing to DVC checklist.
π If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here.
Thank you for the contribution - we'll try to review it as soon as possible. π
git add <file>
orgit add --intent-to-add <file>
before running the experiment.git add
) will be included in the experiment commit.dvc.lock
files and uncached (git-tracked) outputs which did not exist in git prior to running the experiment.This change is needed to avoid issues where users are not
.gitignore
ing things properly (such as build directories,__pycache__
,pyc
files, etc). Otherwise, all of these types of run/build artifiacts would be included in the experiment git commits.