dvc exp remove --keep
I don't understand why one would want to remove the last n exps. Shouldn't this be in terms of --keep last n? The typical case is that one wants to just remove old exps.
Makes sense to me to have this as an option.
I don't understand why one would want to remove the last n exps. Shouldn't this be in terms of
--keeplastn? The typical case is that one wants to just remove old exps.
Related to this is that dvc exp list -A should be ordered according to the history. Right now the base commits are ordered alphabetically.
Hi there !
Correct me if I'm wrong here (I'm just starting with this codebase).
The idea here could be, first sort the commits in chronological order in _get_n_commits (https://github.com/iterative/dvc/blob/fb24775bc09b19559eaae4f0ba23b1bb1ec569a3/dvc/scm.py#L182 then add an argument to to indicate the direction (before or after) in which we'd like to search the given number of commits, that parameter would drip down from https://github.com/iterative/dvc/blob/fb24775bc09b19559eaae4f0ba23b1bb1ec569a3/dvc/repo/experiments/remove.py#L66
and then add arguments to the exp remove cli command telling if we want to delete --num experiments either --before (new param) or --after (new param) the --rev commit
If I'm not too mistaken, I'm interested in giving it a shot as a first contribution to this repo ! Let me know 😊
Hi there !
Correct me if I'm wrong here (I'm just starting with this codebase).
The idea here could be, first sort the commits in chronological order in
_get_n_commits(Line 182 in fb24775
def _get_n_commits(scm: "Git", revs: list[str], num: int) -> list[str]: then add an argument to to indicate the direction (before or after) in which we'd like to search the given number of commits, that parameter would drip down from dvc/dvc/repo/experiments/remove.py
Line 66 in fb24775
exp_ref_dict = _resolve_exp_by_baseline(repo, rev, num, git_remote) and then add arguments to the
exp removecli command telling if we want to delete--numexperiments either--before(new param) or--after(new param) the--revcommitIf I'm not too mistaken, I'm interested in giving it a shot as a first contribution to this repo ! Let me know 😊
ya overall that sounds right. thanks for tackling this.
re: chronological. i thought, more specifically, it would just be going up the commit tree but i understand it would be the same ordering ...typically.
Fixing the order of the commits was not required for the --keep thing, which also explains why I finally did not go with the --before and --after params on the CLI as initially thought.
Yet, fixing the order of dvc exp list is something I might enjoy working next.