Support disk-level experiment purging in access-profiling#50
Support disk-level experiment purging in access-profiling#50minghangli-uni merged 1 commit intomainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #50 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 16 16
Lines 834 854 +20
=========================================
+ Hits 834 854 +20 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
micaeljtoliveira
left a comment
There was a problem hiding this comment.
@minghangli-uni Thanks for creating this PR! I know this is still marked as draft, but I took the liberty of having a look and adding some suggestions. I hope that's fine.
84874dc to
34898dc
Compare
|
@micaeljtoliveira would you mind having another look? |
micaeljtoliveira
left a comment
There was a problem hiding this comment.
@minghangli-uni Thanks for the changes. This looks almost ready, just a couple of suggestions.
| if exp.status == ProfilingExperimentStatus.RUNNING: | ||
| exp.status = ProfilingExperimentStatus.DONE | ||
|
|
||
| def purge_experiments( |
There was a problem hiding this comment.
| def purge_experiments( | |
| def delete_experiments( |
Since this now also deletes the experiments from the manager, I think "delete" would be clearer than "purge". This requires some updates to the docstring and comments for consistency.
There was a problem hiding this comment.
Yeah agreed. Re the existing delete_experiment, I think renaming it to something clearer, like clean_experiment? I'd prefer to do that in a separate PR.
Another thing is that the runner's delete_experiments currently maps onto payu sweep semantics. Without hard flag it's really a sweep/cleanup only, and with hard it removes the directory. To avoid ambiguity in this repo, I'm leaning towards making delete_experiments deterministic - delete always means a hard delete, so users dont have to remember a flag to know whether delete actually deletes.
There was a problem hiding this comment.
Re the existing
delete_experiment, I think renaming it to something clearer, likeclean_experiment? I'd prefer to do that in a separate PR.
Yes, I agree, that one needs to be renamed (I'm thinking to rename it to something like drop_experiment so it's a bit clearer it does not touch the filesystem). I can take care of it in a different PR, no worries.
Another thing is that the runner's delete_experiments currently maps onto payu sweep semantics. Without hard flag it's really a sweep/cleanup only, and with hard it removes the directory. To avoid ambiguity in this repo, I'm leaning towards making delete_experiments deterministic - delete always means a hard delete, so users dont have to remember a flag to know whether delete actually deletes.
I agree, here it's better to always to a hard delete. Maybe later we can add a Payu-specific method to do a sweep, but I'm not sure that's really useful here.
| dry_run: bool = False, | ||
| remove_repo_dir: bool = False, | ||
| ) -> None: | ||
| """Purges Payu experiments from the work directory. |
There was a problem hiding this comment.
| """Purges Payu experiments from the work directory. | |
| """Delete Payu experiments from the work directory and remove them from the manager. |
2ea43f6 to
fafc23b
Compare
|
Thanks @micaeljtoliveira for your suggestion. Would you mind taking another look at this? |
|
I'll clean up the history before merge |
fafc23b to
bbd5d45
Compare
bbd5d45 to
624576c
Compare
closes #49