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 the .phenotypic/ cache (progress/, processing_state.json, processing_events.log, logs, and generated SLURM scripts) and any pre-migration root-level machine-state, while leaving user-facing output artifacts (deliverables/, results/, qc/, …) untouched. 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.

Returns:

True if any machine-state was removed, else False.

Parameters:

output_dir (Path)

Return type:

bool