-
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
Remove pushed experiment from git remote #6006
Comments
For now you can just use git and directly remove experiment refs with # get list of exps pushed to origin
$ git ls-remote origin "refs/exps/*"
# remove one of the listed refs
$ git push -d origin refs/exps/path/to/ref |
@pmrowla Do you think there's anything to discuss here, or is this a straightforward feature to implement? |
@dberenbaum it still needs a discussion of what the usage should look like |
I think we actually need options for both
Can you elaborate? Does the suggested syntax above help? |
@dberenbaum My original comment was regarding whether it should be tied to Also, I do think it's worth asking the question of "is removing remote experiments necessary"? There are reasons to disallow it - the same reasons that github always keeps all pull request refs and always keeps references to all remote git branches that have ever existed (including remote branches that users manually "delete" through either github's UI or the git CLI). Should removing remote exps actually delete refs, or should it just hide them in the way that github "removes" git branches - they are just moved into a different namespace so they don't show up in git CLI "list remote branch" commands (so that they can be restored later if the user decides they didn't actually want to delete that branch)? Or maybe what we really need is just a way to filter the results of |
Also I know this came up in the CML auto-push discussion as well (since we will be generating a lot of experiments that way). Maybe the CML runner pushed exps should just go into their own namespace that can be regularly cleaned on the CML side |
IMO we don't need to follow Git since Similarly, I think extending the existing dvc commands for removing experiments seems more natural than trying to follow the
Given the ephemeral nature of experiments, I think it's fine to delete them and maybe preferable to moving them. People might accidentally push a huge experiment and want to delete the ref so they can gc the repo and clean up hanging commits. That's probably a separate issue, but deleting the refs seems acceptable to me.
Good idea. Either approach could be useful for CML, but that's not the primary driver for this feature. We are starting to promote experiment sharing more in docs, courses, etc., and it seems like sharing experiments isn't ready to be used if we don't have some way to remove pushed experiments. Experiments should be easy to both create and delete so that users feel free to try lots of things and only keep what works, regardless of whether the experiments are local or shared. |
regarding implementation for this, deleting remote refs is a dvc/dvc/scm/git/backend/base.py Line 193 in 82e559a
with src set to None
|
fix iterative#6006 1. add a new argument `--git-remote` to `dvc exp remove` 2. add some tests for it
* Clean up remotes's exps fix #6006 1. add a new argument `--git-remote` to `dvc exp remove` 2. support remote a special remote exp 3. add tests for it 4. fix #6421 5. add a test for #6421. 6. extract some functions from the `dvc pull`, `dvc push`, `dvc remove` to utils. 7. add a tests for this new util function `resolve_exp_ref` 8. add `__init__.py` to some test package for the pytest fail Co-authored-by: Jorge Orpinel <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Dave Berenbaum <[email protected]>
Push an experiment to a git remote:
Then:
Currently, only local experiment can be removed with:
but
dvc exp list origin
still showsmyexpe
.I would like to also be able to remove a pushed experiment on the remote.
The text was updated successfully, but these errors were encountered: