-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
exp init: don't add outs to .gitignore #7740
Conversation
404e398
to
24639dd
Compare
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.
Out of the scope of the P.R. but was wondering why exp init doesn't use stage.add
?
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.
Need to update tests:
assert scm.is_tracked(".gitignore")
24639dd
to
37a20e9
Compare
Sorry, forgot to remove those lines before before pushing. It should pass now.
@skshetry can answer, but I'm guessing from dvc/dvc/repo/experiments/init.py Line 254 in 37a20e9
|
Previously, we used to ask for confirmation in an interactive mode before creating the stage. Now, this PR is another reason for not using We could extend |
I'm fine with keeping the scope of this PR as small as possible for now. Could one of you please review now that the tests have been fixed? |
@dberenbaum, I am a bit hesitant to change the behaviour here, although no strong opinion. I'm okay with:
DVC expects the path to the output to exist in a lot of places (more in relation to stage's working directory, but usually that's where |
@skshetry Can you explain why you are hesitant (and why dvc should generate I opened a PR for 3 in #7751. That would solve the immediate issue, although the rationale for adding to |
The only concern is that the users may |
Addresses #5802 (comment) by not adding to
.gitignore
duringexp init
since it breaks for subdirectories. Adding to.gitignore
is still done onexp run
/repro
.