Task-based Execution#
Warning
Task-based execution is an experimental feature and subject to change in future releases of openfe.
When using quickrun execution, you orchestrate the campaign by choosing which Transformation to run and when to run it.
With task-based execution, openfe handles that orchestration for you.
You provide an entire AlchemicalNetwork, openfe breaks it into dependent tasks, and one or
more Workers claim those tasks as soon as they are ready to run.
A task is a single ProtocolUnit, for example the setup, simulation, or
analysis step of one repeat of one Transformation.
A task-based campaign uses:
A Warehouse, usually a
storage.FileSystemWarehouse: a directory with a strict structure that stores the campaign data needed for execution, including the inputs, tasks, and results.A
TaskStatusDB: a SQLite database file that tracks tasks’ statuses and dependencies.One or more
Workers: The execution objects that claim available tasks, execute them, and write the results to the Warehouse. On the CLI they are invoked withopenfe run-task, which is equivalent toWorker.execute_unit()in the Python API.
This means that you can execute an entire AlchemicalNetwork's campaign just by calling the openfe run-task command or Worker.execute_unit() call iteratively to run each task until the entire campaign is complete, without needing to track specific Transformation JSON files.
For details on how to run an openfe campaign using task-based execution, see the following tutorials: