llama.dev.clean package

Clean up the LLAMA output directory, rotating out-of-date auxilliary files out of the way and archiving them on remote storage and setting event flag values for matching events to the values specified in --flags. You will need to specify a pattern for matching events that need to be cleaned using the run positional argument and the --downselect flag (see llama run -h help documentation for details); for example, you can match events created more than 86400 seconds ago with --downselect sec_since_v0_gt=86400 to clean up test events older than a day.

llama.dev.clean.cleanup_testevents(run: llama.run.Run, archive_dir: str = None, dryrun: bool = False)

Clean up all events returned by run.events and move them to a dated subdirectory of archive_dir (defaults to TEST_ARCHIVE). You should apply any downselections to run so that run.events only returns test events older than the age you specify. If dryrun is True, no action will be taken, but the intended actions will be logged.

llama.dev.clean.set_flags_oldevents(run: llama.run.Run, dryrun: bool = False, flags: dict = frozenset({}))

Set event flags for all events returned by run.events. Apply any downselections you need to run before passing it. Use this to e.g. mark old events as no longer being able to upload files automatically.