Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix #10593 -- add --keep option for dvc experiments remove #10633

Merged
merged 25 commits into from
Nov 30, 2024

Conversation

rmic
Copy link
Contributor

@rmic rmic commented Nov 23, 2024

Description

This PR addresses issue #10593 where a --keep flag was suggested to keep only the last 'n' experiments (to keep the latest ones after a ton of failed attempts) instead of deleting them

  • A new flag is introduced on the cli only for the experiments remove command
  • The code of the command has been adapted to do so
  • Tests have been written and executed

Checklist

Copy link

codecov bot commented Nov 23, 2024

Codecov Report

Attention: Patch coverage is 96.15385% with 2 lines in your changes missing coverage. Please review.

Project coverage is 91.03%. Comparing base (2431ec6) to head (fe5c5d7).
Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
dvc/repo/experiments/refs.py 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10633      +/-   ##
==========================================
+ Coverage   90.68%   91.03%   +0.35%     
==========================================
  Files         504      504              
  Lines       39795    39847      +52     
  Branches     3141     3151      +10     
==========================================
+ Hits        36087    36275     +188     
+ Misses       3042     2945      -97     
+ Partials      666      627      -39     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rmic rmic marked this pull request as ready for review November 23, 2024 22:55
@rmic
Copy link
Contributor Author

rmic commented Nov 24, 2024

Hi @shcheklein !

Thanks a lot for your review !
I'll make changes according to your comments asap.

@rmic rmic force-pushed the fix-10593 branch 2 times, most recently from f5e8788 to 286b465 Compare November 28, 2024 18:13
@rmic
Copy link
Contributor Author

rmic commented Nov 28, 2024

It looks like the lint test is broken on windows-latest.

@skshetry

This comment was marked as resolved.

rmic and others added 23 commits November 29, 2024 21:14
… didn't make sense to delete everything if an exp name did not exist
    - added a test to check if the error is raised
    - fixed CLI message
@rmic rmic changed the title Fix 10593 -- add --keep option for dvc experiments remove Fix #10593 -- add --keep option for dvc experiments remove Nov 29, 2024
@shcheklein shcheklein merged commit 368c785 into iterative:main Nov 30, 2024
27 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants