tracdap.rt.metadata.flow

Module Contents

Classes

FlowDefinition

A flow defines an execution graph as a set of connections between models and data

FlowEdge

A connection between two nodes in a flow

FlowNode

Describes an individual node in a flow

FlowNodeType

Specify the type of an individual flow node

FlowSocket

A socket is a point of connection for wiring up the edges in a flow

class tracdap.rt.metadata.flow.FlowDefinition

A flow defines an execution graph as a set of connections between models and data

A flow describes the shape of the execution graph, it does not fix in advance the set of models and datasets that will go into it. When a RUN_FLOW job is created, the job matches the flow with a set of models, inputs, outputs and parameters.

See also

JobDefinition

edges

edges

Type:

List[FlowEdge]

inputs

inputs

Type:

Dict[str, ModelInputSchema]

nodes

nodes

Type:

Dict[str, FlowNode]

outputs

outputs

Type:

Dict[str, ModelOutputSchema]

parameters

parameters

Type:

Dict[str, ModelParameter]

class tracdap.rt.metadata.flow.FlowEdge

A connection between two nodes in a flow

See also

FlowSocket

source

source

Type:

FlowSocket

target

target

Type:

FlowSocket

class tracdap.rt.metadata.flow.FlowNode

Describes an individual node in a flow

See also

FlowDefinition

inputs

inputs

Type:

List[str]

label

label

Type:

str

nodeAttrs

nodeAttrs

Type:

List[TagUpdate]

nodeProps

nodeProps

Type:

Dict[str, Value]

nodeSearch

nodeSearch

Type:

SearchExpression

nodeType

nodeType

Type:

FlowNodeType

outputs

outputs

Type:

List[str]

parameters

parameters

Type:

List[str]

class tracdap.rt.metadata.flow.FlowNodeType(*args, **kwds)

Bases: enum.Enum

Specify the type of an individual flow node

See also

FlowNode

INPUT_NODE = 1

Input nodes described inputs to the flow, such as a files or datasets

MODEL_NODE = 3

Model nodes are placeholders for TRAC models that will be supplied at runtime

NODE_TYPE_NOT_SET = 0
OUTPUT_NODE = 2

Output nodes describe outputs the flow produces, such as a files or datasets

PARAMETER_NODE = 4

Parameter nodes allow explicit mapping of parameters into models (TRAC can infer parameters by name if they are not defined explicitly)

class tracdap.rt.metadata.flow.FlowSocket

A socket is a point of connection for wiring up the edges in a flow

For parameter, input and output nodes the socket is just the node name and the socket field will be blank. For models, the node name refers to a model node and the socket is the name of the parameter, input or output being connected. E.g. these two sockets could be used to connect a flow input to a model, using an edge:

flow_input_socket = { "node": "my_input_dataset", socket: "" }
model_input_socket = { "node": "my_model", "socket": "input_1" }.

See also

FlowEdge

node

node

Type:

str

socket

socket

Type:

str