vertebrae.structured
Structured unit materialization parallel to spatial segmentation flows.
Classes
One flattened, grouped structured embedding output. |
|
One explicit one-to-one mapping from embeddings to annotation rows. |
|
Named callable that aligns structured embeddings to annotated units. |
Functions
|
Return an aligner that drops fixed leading/trailing embedding rows. |
|
Return an aligner that keeps an explicit subset of embedding rows. |
|
Return an aligner that maps annotations to selected frame rows. |
|
Extract, align, and flatten declared structured outputs. |
|
Yield structured outputs one at a time after shared extraction and alignment. |
Module Contents
- class vertebrae.structured.StructuredMaterialization[source]
One flattened, grouped structured embedding output.
- class vertebrae.structured.StructuredAlignment[source]
One explicit one-to-one mapping from embeddings to annotation rows.
- class vertebrae.structured.StructuredUnitAligner(name, align_fn, recipe_data=None, cache_identity=None)[source]
Named callable that aligns structured embeddings to annotated units.
- Parameters:
name (str)
align_fn (Callable[[Any, Dict[str, Any]], Any])
recipe_data (Optional[Dict[str, Any]])
cache_identity (Optional[str])
- vertebrae.structured.drop_special_rows(leading=0, trailing=0, *, name='drop_special_rows')[source]
Return an aligner that drops fixed leading/trailing embedding rows.
- Parameters:
leading (int)
trailing (int)
name (str)
- Return type:
- vertebrae.structured.keep_row_indices(embedding_indices, annotation_indices=None, *, name='keep_row_indices')[source]
Return an aligner that keeps an explicit subset of embedding rows.
- Parameters:
embedding_indices (Sequence[int])
annotation_indices (Optional[Sequence[int]])
name (str)
- Return type:
- vertebrae.structured.select_frame_rows(*, every_n=None, indices=None, indices_metadata_key=None, start=0, name='select_frame_rows')[source]
Return an aligner that maps annotations to selected frame rows.
- Parameters:
every_n (Optional[int])
indices (Optional[Sequence[int]])
indices_metadata_key (Optional[str])
start (int)
name (str)
- Return type:
- vertebrae.structured.materialize_structured_outputs(dataset, extractor, batch_size=16, aligners=None, resource_profiler=None, memory_config=None)[source]
Extract, align, and flatten declared structured outputs.
- Parameters:
dataset (vertebrae.datasets.base.BenchmarkDataset)
extractor (Any)
batch_size (int)
aligners (Optional[Mapping[str, StructuredUnitAligner]])
resource_profiler (Optional[Any])
memory_config (Optional[vertebrae.config.MemoryConfig])
- Return type:
- vertebrae.structured.iter_materialize_structured_outputs(dataset, extractor, batch_size=16, aligners=None, resource_profiler=None, memory_config=None)[source]
Yield structured outputs one at a time after shared extraction and alignment.
- Parameters:
dataset (vertebrae.datasets.base.BenchmarkDataset)
extractor (Any)
batch_size (int)
aligners (Optional[Mapping[str, StructuredUnitAligner]])
resource_profiler (Optional[Any])
memory_config (Optional[vertebrae.config.MemoryConfig])
- Return type:
Iterator[StructuredMaterialization]