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

Method __init__

sdk/python/feast/labeling/label_view.py:83–195  ·  view source on GitHub ↗

Creates a LabelView object. Args: name: The unique name of this label view. source: The data source for ingesting labels, typically a ``PushSource``. If ``None``, labels can only be written programmatically via ``FeatureStore.push()``.

(
        self,
        *,
        name: str,
        source: Optional[DataSource] = None,
        schema: Optional[List[Field]] = None,
        entities: Optional[List[Entity]] = None,
        ttl: Optional[timedelta] = timedelta(days=0),
        online: bool = True,
        description: str = "",
        tags: Optional[Dict[str, str]] = None,
        owner: str = "",
        labeler_field: str = "labeler",
        conflict_policy: ConflictPolicy = ConflictPolicy.LAST_WRITE_WINS,
        reference_feature_view: Optional[str] = None,
    )

Source from the content-addressed store, hash-verified

81 reference_feature_view: Optional[str]
82
83 def __init__(
84 self,
85 *,
86 name: str,
87 source: Optional[DataSource] = None,
88 schema: Optional[List[Field]] = None,
89 entities: Optional[List[Entity]] = None,
90 ttl: Optional[timedelta] = timedelta(days=0),
91 online: bool = True,
92 description: str = "",
93 tags: Optional[Dict[str, str]] = None,
94 owner: str = "",
95 labeler_field: str = "labeler",
96 conflict_policy: ConflictPolicy = ConflictPolicy.LAST_WRITE_WINS,
97 reference_feature_view: Optional[str] = None,
98 ):
99 """Creates a LabelView object.
100
101 Args:
102 name: The unique name of this label view.
103 source: The data source for ingesting labels, typically a
104 ``PushSource``. If ``None``, labels can only be written
105 programmatically via ``FeatureStore.push()``.
106 schema: The list of ``Field`` objects describing both entity
107 columns and label columns. Entity columns are identified
108 by matching against entity join keys.
109 entities: The list of ``Entity`` objects whose join keys are
110 used to key the labels.
111 ttl: The time-to-live for labels in the online store.
112 ``timedelta(0)`` means labels never expire. ``None`` means
113 the label view inherits the default TTL.
114 online: Whether this label view should be materialized to the
115 online store for low-latency serving.
116 description: A human-readable description of what the labels
117 represent.
118 tags: A dictionary of key-value pairs for arbitrary metadata.
119 owner: The owner of this label view, typically an email address.
120 labeler_field: The name of the field in the schema that
121 identifies the labeler. Defaults to ``"labeler"``.
122 conflict_policy: The policy for resolving conflicting labels
123 from different labelers. Defaults to
124 ``ConflictPolicy.LAST_WRITE_WINS``. Enforced for offline
125 store reads (training, UI). Online store uses LAST_WRITE_WINS.
126 reference_feature_view: The name of the ``FeatureView`` whose
127 entities this label view annotates. This is informational
128 and does not create a hard dependency.
129 """
130 self.ttl = ttl
131 self.entities = []
132 self.source = source
133
134 schema = schema or []
135
136 features: List[Field] = []
137 self.entity_columns = []
138
139 join_keys: List[str] = []
140 if entities:

Callers

nothing calls this directly

Calls 2

from_value_typeFunction · 0.90
FieldClass · 0.90

Tested by

no test coverage detected