vertebrae.extractors.base
Feature extractor protocols and shared multi-output types.
Classes
Declarative description of one named extractor output. |
|
Materialized embedding output from one extractor pass. |
|
Protocol implemented by all vertebrae feature extractors. |
|
Optional protocol for extractors that can emit multiple embedding matrices. |
|
Optional protocol for independent query/gallery branch encoding. |
|
Optional extractor-owned hooks for framework-specific resource data. |
Functions
|
Validate an optional signed integer without lossy coercion. |
|
Copy deterministic, finite metadata without coercing its typed content. |
Module Contents
- class vertebrae.extractors.base.EmbeddingOutputSpec[source]
Declarative description of one named extractor output.
- class vertebrae.extractors.base.EmbeddingOutput[source]
Materialized embedding output from one extractor pass.
- class vertebrae.extractors.base.FeatureExtractor[source]
Bases:
ProtocolProtocol implemented by all vertebrae feature extractors.
- fit(X, y=None)[source]
Fit extractor state when applicable.
- Parameters:
X (Any) – Input samples.
y (Any) – Optional labels.
- Returns:
The fitted extractor.
- Return type:
- transform(X)[source]
Transform inputs into embeddings.
- Parameters:
X (Any) – Input samples.
- Returns:
Dense or sparse numeric embedding matrix.
- Return type:
numpy.ndarray
- class vertebrae.extractors.base.MultiOutputFeatureExtractor[source]
Bases:
ProtocolOptional protocol for extractors that can emit multiple embedding matrices.
- output_specs()[source]
Return the named outputs this extractor can materialize.
- Return type:
List[EmbeddingOutputSpec]
- transform_many(X)[source]
Transform inputs into multiple named embedding outputs.
- Parameters:
X (Any)
- Return type:
List[EmbeddingOutput]
- class vertebrae.extractors.base.RetrievalCapableExtractor[source]
Bases:
ProtocolOptional protocol for independent query/gallery branch encoding.
- class vertebrae.extractors.base.ResourceProfileAdapter[source]
Bases:
ProtocolOptional extractor-owned hooks for framework-specific resource data.
- deployment_artifacts()[source]
Return explicit local model/checkpoint artifact paths.
- Return type:
Sequence[vertebrae.profiling.DeploymentArtifact]