spdl.autoresearch.core.read_engine_state¶
- read_engine_state(workdir: Path) tuple[list[TaskSpec], list[TaskSpec], str] | None[source]¶
Read the orchestrator’s queued, running, and status fields.
Inverse of
write_engine_state(). ReturnsNoneif no engine-state file exists inworkdir(a fresh run).- Parameters:
workdir – Directory previously passed to
write_engine_state().- Returns:
A
(queued, running, status)tuple when the file exists, orNonefor a fresh workdir.- Raises:
ValueError – If the file is malformed or contains entries that are not
TaskSpecobjects.