A feature service defines a logical group of features from one or more feature views. This group of features can be retrieved together during training or serving. Attributes: name: The unique name of the feature service. feature_view_projections: A list containing featu
| 24 | |
| 25 | @typechecked |
| 26 | class FeatureService: |
| 27 | """ |
| 28 | A feature service defines a logical group of features from one or more feature views. |
| 29 | This group of features can be retrieved together during training or serving. |
| 30 | |
| 31 | Attributes: |
| 32 | name: The unique name of the feature service. |
| 33 | feature_view_projections: A list containing feature views and feature view |
| 34 | projections, representing the features in the feature service. |
| 35 | description: A human-readable description. |
| 36 | tags: A dictionary of key-value pairs to store arbitrary metadata. |
| 37 | owner: The owner of the feature service, typically the email of the primary |
| 38 | maintainer. |
| 39 | created_timestamp: The time when the feature service was created. |
| 40 | last_updated_timestamp: The time when the feature service was last updated. |
| 41 | """ |
| 42 | |
| 43 | name: str |
| 44 | _features: List[Union[FeatureView, OnDemandFeatureView, LabelView]] |
| 45 | feature_view_projections: List[FeatureViewProjection] |
| 46 | description: str |
| 47 | tags: Dict[str, str] |
| 48 | owner: str |
| 49 | created_timestamp: Optional[datetime] = None |
| 50 | last_updated_timestamp: Optional[datetime] = None |
| 51 | logging_config: Optional[LoggingConfig] = None |
| 52 | |
| 53 | precompute_online: bool = False |
| 54 | |
| 55 | def __init__( |
| 56 | self, |
| 57 | *, |
| 58 | name: str, |
| 59 | features: List[Union[FeatureView, OnDemandFeatureView, LabelView]], |
| 60 | tags: Optional[Dict[str, str]] = None, |
| 61 | description: str = "", |
| 62 | owner: str = "", |
| 63 | logging_config: Optional[LoggingConfig] = None, |
| 64 | precompute_online: bool = False, |
| 65 | ): |
| 66 | """ |
| 67 | Creates a FeatureService object. |
| 68 | |
| 69 | Args: |
| 70 | name: The unique name of the feature service. |
| 71 | features: A list containing feature views and feature view |
| 72 | projections, representing the features in the feature service. |
| 73 | description (optional): A human-readable description. |
| 74 | tags (optional): A dictionary of key-value pairs to store arbitrary metadata. |
| 75 | owner (optional): The owner of the feature view, typically the email of the |
| 76 | primary maintainer. |
| 77 | precompute_online (optional): When True, a pre-computed feature vector is |
| 78 | maintained per entity for single-read online retrieval. |
| 79 | """ |
| 80 | self.name = name |
| 81 | self._features = features |
| 82 | self.feature_view_projections = [] |
| 83 | self.description = description |
no outgoing calls