vertebrae.extractors.huggingface_time_series
Optional Hugging Face time-series embedding extractor.
Classes
Hugging Face time-series backbone extractor with explicit pooling. |
Module Contents
- class vertebrae.extractors.huggingface_time_series.HFTimeSeriesExtractor(name, model_id, pooling='mean', hidden_layer=None, outputs=None, structured_outputs=None, batch_size=32, device=None, revision=None, trust_remote_code=False, input_kwargs=None, model_kwargs=None, checkpoint_paths=None, cache_identity=None)[source]
Hugging Face time-series backbone extractor with explicit pooling.
- Parameters:
name (str) – User-facing extractor name.
model_id (str) – Hugging Face model identifier or local path.
pooling (str) – Pooling mode: “mean”, “last”, or “flatten”.
hidden_layer (Optional[int]) – Optional hidden-state layer index to pool from. Defaults to the model’s final sequence output.
batch_size (int) – Number of series encoded per batch.
device (Optional[str]) – Optional device string.
revision (Optional[str]) – Optional model revision.
trust_remote_code (bool) – Whether to allow remote model code.
input_kwargs (Optional[Dict[str, Any]]) – Extra keyword arguments merged into every model call.
model_kwargs (Optional[Dict[str, Any]]) – Extra keyword arguments for AutoModel.
outputs (Optional[List[Dict[str, Any]]])
structured_outputs (Optional[List[Dict[str, Any]]])
checkpoint_paths (Optional[List[str]])
cache_identity (Optional[str])
- fit(X, y=None)[source]
No-op fit for frozen Hugging Face time-series models.
- Parameters:
X (Any)
y (Any)
- Return type:
- transform(X)[source]
Encode time-series inputs into dense embeddings.
- Parameters:
X (Any)
- Return type:
numpy.ndarray