backend_from_policy
Note
This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the Habitat Guide and Python API guide (v2.0) for usage.
- backend_from_policy(policy: RunPolicy) ProcessPoolBackend | SerialBackend[source]
Build the execution backend a policy asks for.
- Parameters:
policy – Translated run policy.
- Returns:
A process-pool backend when the policy requires spawn (
backend == "process",workers > 1, orparallel_mode == "isolated"); otherwise a serial backend carrying the policy’s checkpoint / failure flags. Timeout knobs apply only under the process-pool backend.