phenotypic.sdk_.clear_machine_state#
- phenotypic.sdk_.clear_machine_state(output_dir: Path) bool[source]#
Remove all of a run’s machine-state for a clean
--restart.Deletes current state inside
.phenotypic/(progress/,processing_state.json,processing_events.log, logs, and generated SLURM scripts) and any pre-migration root-level machine-state, while preserving_PRESERVED_ON_RESTART– the append-onlyterminal_failures.jsonljournal andrestart_epoch.json, because a counter that resets on the operation it fences is not a fence – along with user-facing output artifacts (deliverables/,results/,qc/, …). Read that set’s membership rule before adding to it; it is now the only thing standing between--restartand every artifact under.phenotypic/. This is the difference between--restart(re-run the orchestration against clean state, keep outputs) and--overwrite(delete the whole output dir). Clearing the event log here is what stops a restart from appending to — and rebuilding its manifest/failure records from — the prior run’s events.