MODULE REFERENCE
jobs
anomx.execution.jobsJSON job definitions.
A job is a directed graph of nodes running from start to end. The same JSON structure is edited visually on the platform's pipeline canvas, executed synchronously by anomx.execution.runner.JobRunner, and executed asynchronously on the platform where every node becomes its own task that queues its next nodes.
`json { "nodes": [ { "id": "start", "type": "start", "last": [], "next": ["end"], "config": {}, "_meta": {"x": 0, "y": 0} }, { "id": "end", "type": "end", "last": ["start"], "next": [], "config": {} } ] } `
_meta carries editor-only information (canvas position and the like); the runner ignores it but round-trips it untouched.
JobDefinition
JobDefinition(nodes: list[JobNode] = <factory: list>, metadata: dict[str, Any] = <factory: dict>)A validated graph of job nodes.
| Parameter | Type | Default |
|---|---|---|
nodes | list[JobNode] | <factory: list> |
metadata | dict[str, Any] | <factory: dict> |
Members
nodesattribute
nodes: list[JobNode] = field(default_factory=list)metadataattribute
metadata: dict[str, Any] = field(default_factory=dict)from_dictclassmethod
from_dict(payload: dict[str, Any]) -> JobDefinition| Parameter | Type | Default |
|---|---|---|
payload | dict[str, Any] | required |
Returns JobDefinition
to_dictmethod
nodemethod
node(node_id: str) -> JobNode| Parameter | Type | Default |
|---|---|---|
node_id | str | required |
Returns JobNode
start_nodemethod
next_nodesmethod
next_nodes(node: JobNode) -> list[JobNode]| Parameter | Type | Default |
|---|---|---|
node | JobNode | required |
Returns list[JobNode]
validatemethod
validate() -> list[str]Return structural problems, empty when the definition is runnable.
Returns list[str]
JobDefinitionError
JobDefinitionErrorBases: ValueError
Raised when a job definition is structurally invalid.
JobNode
JobNode(id: str, type: JobNodeType, last: list[str] = <factory: list>, next: list[str] = <factory: list>, config: dict[str, Any] = <factory: dict>, meta: dict[str, Any] = <factory: dict>)One processing step in a job graph.
| Parameter | Type | Default |
|---|---|---|
id | str | required |
type | JobNodeType | required |
last | list[str] | <factory: list> |
next | list[str] | <factory: list> |
config | dict[str, Any] | <factory: dict> |
meta | dict[str, Any] | <factory: dict> |
Members
idattribute
id: strtypeattribute
type: JobNodeTypelastattribute
last: list[str] = field(default_factory=list)nextattribute
next: list[str] = field(default_factory=list)configattribute
config: dict[str, Any] = field(default_factory=dict)metaattribute
meta: dict[str, Any] = field(default_factory=dict)from_dictclassmethod
from_dict(payload: dict[str, Any]) -> JobNode| Parameter | Type | Default |
|---|---|---|
payload | dict[str, Any] | required |
Returns JobNode
to_dictmethod
JobNodeType
JobNodeTypeBases: str, Enum
Members
STARTattribute
START = 'start'MODEL_TRAININGattribute
MODEL_TRAINING = 'model_training'MODEL_INFERENCEattribute
MODEL_INFERENCE = 'model_inference'SCORERattribute
SCORER = 'scorer'DETECTORattribute
DETECTOR = 'detector'CLASSIFIERattribute
CLASSIFIER = 'classifier'IF_ELSEattribute
IF_ELSE = 'if_else'PYTHONattribute
PYTHON = 'python'ENDattribute
END = 'end'