Builder DSL API Reference¶
The builder module is exposed at groggy.builder and provides the building blocks for composing
custom step pipelines.
builder(name: str) -> AlgorithmBuilder¶
Factory function that returns a new AlgorithmBuilder configured with the given name. The resulting
algorithm is registered under custom.{name} when build() is called.
AlgorithmBuilder¶
Methods:
init_nodes(default=0.0) -> VarHandlenode_degrees(nodes: VarHandle) -> VarHandlenormalize(values: VarHandle, method="sum") -> VarHandleattach_as(attr_name: str, values: VarHandle) -> Nonebuild() -> BuiltAlgorithm
Attributes:
steps— list of step dictionariesvariables— mapping of variable names toVarHandle
VarHandle¶
Lightweight reference returned from builder methods. Useful for debugging and for passing into subsequent builder calls.
BuiltAlgorithm¶
Implements the AlgorithmHandle protocol. The object can be passed to:
Subgraph.apply(custom_algo)groggy.pipeline.apply(subgraph, custom_algo)Pipeline([... custom_algo ...])
Under the hood, to_spec() serialises the recorded steps to the builder.step_pipeline algorithm
implemented in Rust.