Pipeline
- class ioiocore.pipeline.Pipeline(directory=None)[source]
Bases:
Interface
A class representing a pipeline, inheriting from Interface. Manages nodes and their connections within the pipeline.
- Parameters:
directory (str)
- __init__(directory=None)[source]
Initializes the pipeline.
- Parameters:
directory (str, optional) – Directory to be used for the pipeline (default is None).
- add_node(node)[source]
Adds a node to the pipeline.
- Parameters:
node (Node) – The node to add to the pipeline.
- connect_ports(output_node, output_node_port, input_node, input_node_port)[source]
Connects output and input ports of nodes in the pipeline.
- static deserialize(data)[source]
Deserializes the pipeline from a dictionary.
- Parameters:
data (dict) – A dictionary containing the serialized pipeline data.
- Returns:
The deserialized pipeline object.
- Return type:
- disconnect_ports(output_node, output_node_port, input_node, input_node_port)[source]
Disconnects output and input ports of nodes in the pipeline.
- get_condition()[source]
Returns the current condition of the pipeline.
- Returns:
The current condition of the pipeline.
- Return type:
- get_elapsed_time()[source]
Returns the elapsed time since the pipeline started.
- Returns:
The elapsed time in seconds.
- Return type:
float
- get_last_error()[source]
Returns the last error message from the pipeline.
- Returns:
The last error message.
- Return type:
str
- get_load()[source]
Returns the current load of the pipeline.
- Returns:
The current load as a percentage.
- Return type:
float
- get_state()[source]
Returns the current state of the pipeline.
- Returns:
The current state of the pipeline.
- Return type:
- remove_node(node)[source]
Removes a node from the pipeline.
- Parameters:
node (Node) – The node to remove from the pipeline.