flowpipe.evaluator module

Classes to evaluate flowpipe Graphs in various ways.

class flowpipe.evaluator.Evaluator

Bases: object

An engine to evaluate a Graph.

evaluate(graph: Graph, skip_clean: bool = False, on_node_event: NodeEventCallback | None = None) None

Evaluate the graph.

Parameters:
  • graph (flowpipe.Graph) – The graph to evaluate.

  • skip_clean (bool) – Whether to skip nodes that are clean.

  • on_node_event (callable) – Optional callback invoked for node lifecycle events: started, finished, failed.

  • data_persistence (bool) – If false, the data on plugs that have connections gets cleared (set to None). This reduces the reference count of objects.

class flowpipe.evaluator.LegacyMultiprocessingEvaluator(submission_delay: float = 0.1)

Bases: Evaluator

Evaluate nodes in separate processes.

class flowpipe.evaluator.LinearEvaluator

Bases: Evaluator

Evaluate the graph linearly in a single thread.

class flowpipe.evaluator.ThreadedEvaluator(max_workers: int | None = None)

Bases: Evaluator

Evaluate each node in a separate thread.