MCPcopy Index your code
hub / github.com/feast-dev/feast / get_embedding_dim

Method get_embedding_dim

sdk/python/feast/embedder.py:56–69  ·  view source on GitHub ↗

Return the embedding dimension for a given modality. Subclasses should override this to return the actual dimension so that auto-generated FeatureView schemas use the correct vector_length. Args: modality: The modality to query (e.g. "text", "image").

(self, modality: str)

Source from the content-addressed store, hash-verified

54 return list(self._modality_handlers.keys())
55
56 def get_embedding_dim(self, modality: str) -> Optional[int]:
57 """
58 Return the embedding dimension for a given modality.
59
60 Subclasses should override this to return the actual dimension
61 so that auto-generated FeatureView schemas use the correct vector_length.
62
63 Args:
64 modality: The modality to query (e.g. "text", "image").
65
66 Returns:
67 The embedding dimension, or None if unknown.
68 """
69 return None
70
71 @abstractmethod
72 def embed(self, inputs: List[Any], modality: str) -> "np.ndarray":

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected