pipefunc.lazy module
Provides the pipefunc.lazy module, which contains functions for lazy evaluation.
-
class pipefunc.lazy.TaskGraph(graph: nx.DiGraph, mapping: dict[int, _LazyFunction], cache: SimpleCache)[source]
Bases: NamedTuple
A named tuple representing a task graph.
-
graph:
DiGraph
Alias for field number 0
-
mapping:
dict[int, _LazyFunction]
Alias for field number 1
-
cache:
SimpleCache
Alias for field number 2
-
pipefunc.lazy.construct_dag()[source]
Create a directed acyclic graph (DAG) for a pipeline.
- Return type:
Generator[TaskGraph, None, None]
-
pipefunc.lazy.task_graph()[source]
Return the task graph.
- Return type:
TaskGraph | None
-
pipefunc.lazy.evaluate_lazy(x)[source]
Evaluate a lazy object.
- Return type:
Any