Ewoks Engines#
Ewoks workflows can be executed using several engines, each with its own capabilities:
Dask: Distributed and parallel computing framework.
Pypushflow: Scheduler for acyclic and cyclic task graphs.
Orange: Visual programming and data visualization platform.
Using a Supported Engine#
To run workflows with a specific engine, install the appropriate extra:
pip install ewoks[dask] # For Dask
pip install ewoks[ppf] # For Pypushflow
pip install ewoks[orange] # For Orange
If no engine is installed, Ewoks defaults to a basic sequential engine ("core").
To specify the engine explicitly, use the --engine option:
ewoks execute --test demo --engine dask
Warning
Orange execution is GUI-driven and cannot be triggered from the CLI.
Running:
ewoks execute --test demo --engine orange
…will open the Orange GUI, where you can edit the workflow.
To execute it:
Double-click on
task0in the workflow.Use the Trigger button in the Task widget.
For guidance, see Orange’s getting started docs.
Engine Feature Comparison#
Some engines support more advanced features, like loops or GUI interaction:
engine |
Loops |
Conditional Links |
Parallel execution |
Interaction (GUI) |
Native support |
|---|---|---|---|---|---|
|
✗ |
✗ |
✗ |
✗ |
✓ |
|
✗ |
✗ |
✓ |
✗ |
✓ |
|
✓ |
✓ |
✓ |
✗ |
✓ |
|
✗ |
✗ |
✓ |
✓ |
✗ |
Note
Native support means that Ewoks tasks can be executed without modification.
For Orange, you must wrap each Ewoks task in a corresponding Orange widget. See the
Orange widget tutorial
in the ewoksorange documentation.
Adding a New Engine to Ewoks#
To add a custom engine named "abc"
ewoks execute --test demo --engine abc
create a Python package with the appropriate entry point in pyproject.toml:
[project]
name = "ewoksabc"
[project.entry-points."ewoks.engines"]
"abc" = "ewoksabc.engine:AbcWorkflowEngine"
Your engine must implement the abstract interface WorkflowEngine from ewokscore:
from ewokscore.graph import TaskGraph
from ewokscore.engine_interface import WorkflowEngine
class AbcWorkflowEngine(WorkflowEngine):
def execute_graph(self, graph: TaskGraph, ...) -> Optional[dict]:
...
(Optional) Workflow Serialization Support#
If your engine also handles workflow (de)serialization (e.g., from .xyz files), add another entry point:
[project.entry-points."ewoks.engines.serialization.representations"]
"xyz" = "ewoksabc.engine:AbcWorkflowEngine"
Your engine should implement WorkflowEngineWithSerialization:
from ewokscore.engine_interface import WorkflowEngineWithSerialization
class AbcWorkflowEngine(WorkflowEngineWithSerialization):
def execute_graph(self, graph: TaskGraph, ...) -> Optional[dict]:
...
def deserialize_graph(self, graph: Any, ...) -> TaskGraph:
...
def serialize_graph(self, graph: TaskGraph, ...) -> Any:
...
def get_graph_representation(self, graph: Any) -> Optional[str]:
...
This allows Ewoks to recognize and delegate serialization/deserialization to your engine.