MODULE REFERENCE
nodes
anomx.execution.nodesNode execution shared by the synchronous runner and platform tasks.
Every node type reads its inputs from the JSON-encodable context and writes its output back into it. The platform runs each node in its own task with the context travelling through redis; anomx.execution.runner.JobRunner walks the same executor in-process.
JobRunError
JobRunErrorBases: RuntimeError
Raised when a job or node cannot be executed.
NodeExecution
NodeExecution(node_id: str, node_type: str, status: str, context: dict[str, Any], next_node_ids: list[str] = <factory: list>)Outcome of executing one node.
| Parameter | Type | Default |
|---|---|---|
node_id | str | required |
node_type | str | required |
status | str | required |
context | dict[str, Any] | required |
next_node_ids | list[str] | <factory: list> |
Members
node_idattribute
node_id: strnode_typeattribute
node_type: strstatusattribute
status: strcontextattribute
context: dict[str, Any]next_node_idsattribute
next_node_ids: list[str] = field(default_factory=list)NodeExecutor
NodeExecutor(*, components: dict[str, Any] | None = None, python_functions: dict[str, Callable[[dict[str, Any]], Any]] | None = None, model_registry: dict[str, Any] | None = None)Execute job nodes against a shared context.
Components referenced by nodes are resolved from the components registry (key → instance) first, then from dotted import paths. Fitted models stay in model_registry and are referenced from the context via model_ref.
| Parameter | Type | Default |
|---|---|---|
componentskeyword only | dict[str, Any] | None | None |
python_functionskeyword only | dict[str, Callable[[dict[str, Any]], Any]] | None | None |
model_registrykeyword only | dict[str, Any] | None | None |
Members
executemethod
execute(definition: JobDefinition, node_id: str, context: dict[str, Any]) -> NodeExecution| Parameter | Type | Default |
|---|---|---|
definition | JobDefinition | required |
node_id | str | required |
context | dict[str, Any] | required |
Returns NodeExecution
run_python_body
run_python_body(body: str, context: dict[str, Any]) -> dict[str, Any]Execute user-authored function-body code against the context.
The user only writes the body; it runs inside def __anomx_python_node__(context): ... and may mutate or return the context. Risk assessment of the body is the platform's responsibility before the job is allowed to run.
| Parameter | Type | Default |
|---|---|---|
body | str | required |
context | dict[str, Any] | required |
Returns dict[str, Any]