# Block

A Block is a recursive graph structure composed of Units, Layers, and Blocks. A Block is implicitly created using the >> operator.

# Export as Module

Sometimes you may want to export a Block as a module. We recommend wrapping it in its own Block for clarity.

# model/ensemble.py
Ensemble = Block() >> Layer(...)

# experiment.py
from verdict import Pipeline
from .model.ensemble import Ensemble

pipeline = Pipeline() >> Ensemble()

# Materialization

As mentioned in the Programming Model section, a Block is a recursive graph structure. The materialize method recursively flattens all sub-graphs into a flat list of Units.

# Prefix

Through the materialization process, we interatively construct a unique prefix for each Unit using the following rules.

Primitive Prefix Concatenation
Unit unit[shortname name]
Layer layer[i]
Block block