Skip to main content
Version: Beta 🚧

Embedding

Private Preview

This feature is currently in Private Preview.

This feature has the following limitations:
  • Must be enabled by Tecton Support.
  • Available for Rift-based Feature Views.
If you would like to participate in the preview, please file a support ticket.

Summary​

The Embedding class describes an embedding feature that is applied to a Batch Feature View via features param.

Example

from tecton import Embedding, batch_feature_view
from tecton.types import String
@batch_feature_view(
# ...
features=[
Embedding(
input_column=Field("my_column", String),
model="sentence-transformers/all-MiniLM-L6-v2",
name="my_embedding_feature"
),
Embedding(
input_column=Field("my_other_column", String),
model="sentence-transformers/all-MiniLM-L6-v2",
name="my_other_embedding_feature"m
description="my embedding feature description",
tags={"tag": "value"}
)
],
)
def my_fv(data_source):
return data_source

Attributes​

NameData TypeDescription
descriptionOptional[str]A human-readable description of the feature
tagsOptional[Dict[str, str]]Tags associated with the feature (key-value pairs of user-defined metadata).
input_columnFieldDescribes name and type of the column that will be used in the aggregation.
modelstrThe model name that is used to compute the embedding feature. Check https://docs.tecton.ai/docs/beta/defining-features/feature-views/embeddings for all supported models.
nameOptional[str]The name of this feature. Defaults to an autogenerated name, e.g. "my_embedding_feature".

__init__(...)​

Parameters

  • description (Optional[str]) - A human-readable description of the feature Default: None

  • tags (Optional[Dict[str, str]]) - Tags associated with the feature (key-value pairs of user-defined metadata). Default: None

  • input_column (Field) - Describes name and type of the column that will be used in the aggregation. Default: None

  • model (str) - The model name that is used to compute the embedding feature. Check https://docs.tecton.ai/docs/beta/defining-features/feature-views/embeddings for all supported models. Default: None

  • name (Optional[str]) - The name of this feature. Defaults to an autogenerated name, e.g. "my_embedding_feature". Default: None

Was this page helpful?