Parameters¶
- class laminar.components.Parameters(**attributes: Any)¶
Bases:
Layer
Special Layer for handling Flow parameters.
Methods
Execute a layer.
Store each item of a sequence separately so that they may be loaded individually downstream.
Attributes
Artifacts assigned to the layer.
Current layer execution attempt
Layers this layer depends on.
Hooks attached to this layer collated by annotation.
Layer index in its splits
Name of the Layer
Number of splits in the layer execution
State of the Layer
- __init__(**attributes: Any)¶
- property artifacts : dict[str, Any]¶
Artifacts assigned to the layer.
-
attempt : int | None =
None
¶ Current layer execution attempt
- configuration : Configuration¶
Configurations for the Layer
- property dependencies : set[str]¶
Layers this layer depends on.
- execute(*parameters: Layer) None ¶
Execute a layer.
- Parameters¶
- *parameters
Input layers to the layer.
- property hooks : dict[str, set[Callable[[...], Any]]]¶
Hooks attached to this layer collated by annotation.
-
index : int | None =
None
¶ Layer index in its splits
- property name : str¶
Name of the Layer
- shard(**artifacts: Iterable[Any]) None ¶
Store each item of a sequence separately so that they may be loaded individually downstream.
Notes
The artifact that is loaded is of type laminar.configurations.datastores.Accessor.
Usage:
class Task(Layer): def __call__(self) -> None: self.shard(foo=["a", "b", "c"])
- Parameters¶
- **artifacts
Sequence to break up and store.
-
splits : int | None =
None
¶ Number of splits in the layer execution