Skip to content

Comments

Support disk-level experiment purging in access-profiling#50

Draft
minghangli-uni wants to merge 1 commit intomainfrom
49-support-purge_experiments
Draft

Support disk-level experiment purging in access-profiling#50
minghangli-uni wants to merge 1 commit intomainfrom
49-support-purge_experiments

Conversation

@minghangli-uni
Copy link
Collaborator

closes #49

@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 16.66667% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.37%. Comparing base (25e7fc6) to head (03262db).

Files with missing lines Patch % Lines
src/access/profiling/payu_manager.py 16.66% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##              main      #50      +/-   ##
===========================================
- Coverage   100.00%   99.37%   -0.63%     
===========================================
  Files           16       16              
  Lines          791      797       +6     
===========================================
+ Hits           791      792       +1     
- Misses           0        5       +5     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@minghangli-uni minghangli-uni self-assigned this Feb 4, 2026
Copy link
Member

@micaeljtoliveira micaeljtoliveira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

"""Purges Payu experiments from the work directory.

Args:
branches (list[str] | None): List of branches to purge. If None, purges all existing branches.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to be very careful here in order to prevent users from making mistakes. In this case I think it would be best not to allow this parameter to be None and instead force the user to explicitly say they want all branches to be purged, either by saying something like branches="all" or by having some dedicated parameter (all_branches=True).


runner = ExperimentRunner(runner_config)
runner.purge_experiments(
branches=branches,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before passing the list of branches to the runner, I think one should check that all of them are linked to an experiment being managed by this instance of PayuManager.

dry_run=dry_run,
remove_repo_dir=remove_repo_dir,
)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After purging the branches, the corresponding experiment statuses need to be updated accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for purge_experiments() from work directory

2 participants