eolearn.core.eonode
This module implements the EONode class, which specifies the local dependencies of an EOWorkflow
- class eolearn.core.eonode.EONode(task, inputs=<factory>, name=None)[source]
Bases:
object
Class representing a node in EOWorkflow graph.
The object id is kept to help with serialization issues. Tasks created in different sessions have a small chance of having an id clash. For this reason all tasks of a workflow should be created in the same session.
- Parameters:
- name: str | None = None
- uid: str
- get_name(suffix_number=0)[source]
Provides node name according to the class of the contained task and a given number.
- Parameters:
suffix_number (int) –
- Return type:
str
- get_dependencies(*, _memo=None)[source]
Returns a set of nodes that this node depends on. Set includes the node itself.
- Parameters:
_memo (dict[eolearn.core.eonode.EONode, set[eolearn.core.eonode.EONode]] | None) –
- Return type:
- eolearn.core.eonode.linearly_connect_tasks(*tasks)[source]
Creates a list of linearly linked nodes, suitable to construct an EOWorkflow.
Nodes depend on each other in such a way, that the node containing the task at index i is the input node for the node at index i+1. Nodes are returned in the order of execution, so the task at index j is contained in the node at index j, making it easier to construct execution arguments.
- Parameters:
tasks (EOTask | tuple[eolearn.core.eotask.EOTask, str]) – A sequence containing tasks and/or (task, name) pairs
- Return type:
- class eolearn.core.eonode.NodeStats(node_uid, node_name, start_time, end_time, exception_info=None)[source]
Bases:
object
An object containing statistical info about a node execution.
- Parameters:
node_uid (str) –
node_name (str) –
start_time (datetime) –
end_time (datetime) –
exception_info (ExceptionInfo | None) –
- node_uid: str
- node_name: str
- start_time: datetime
- end_time: datetime
- exception_info: ExceptionInfo | None = None