@@ -85,10 +85,9 @@ class FeatureView(BaseFeatureView):
8585 ttl : Optional [timedelta ]
8686 batch_source : DataSource
8787 stream_source : Optional [DataSource ]
88- online_source_config : Optional [Any ]
8988 entity_columns : List [Field ]
9089 features : List [Field ]
91- online : bool
90+ online : Optional [ str ]
9291 description : str
9392 tags : Dict [str , str ]
9493 owner : str
@@ -103,7 +102,7 @@ def __init__(
103102 schema : Optional [List [Field ]] = None ,
104103 entities : List [Entity ] = None ,
105104 ttl : Optional [timedelta ] = timedelta (days = 0 ),
106- online : Union [ bool , DataSource ] = True ,
105+ online : Optional [ str ] = None ,
107106 description : str = "" ,
108107 tags : Optional [Dict [str , str ]] = None ,
109108 owner : str = "" ,
@@ -208,12 +207,8 @@ def __init__(
208207 tags = tags ,
209208 owner = owner ,
210209 )
211- if isinstance (online , bool ):
212- self .online = online
213- warnings .warn (f"FeatureView { self .name } is missing a defined online_store" ,UserWarning )
214- else :
215- self .online = True
216- self .online_source_config = online
210+
211+ self .online = online
217212 self .materialization_intervals = []
218213
219214 def __hash__ (self ):
@@ -335,12 +330,6 @@ def to_proto(self) -> FeatureViewProto:
335330 stream_source_proto = self .stream_source .to_proto ()
336331 stream_source_proto .data_source_class_type = f"{ self .stream_source .__class__ .__module__ } .{ self .stream_source .__class__ .__name__ } "
337332
338- online_source_proto = None
339- if self .online_source_config :
340- online_source_proto = self .online_source_config .to_proto ()
341- online_source_proto .data_source_class_type = f"{ self .online_source_config .__class__ .__module__ } .{ self .online_source_config .__class__ .__name__ } "
342-
343-
344333 spec = FeatureViewSpecProto (
345334 name = self .name ,
346335 entities = self .entities ,
@@ -350,10 +339,9 @@ def to_proto(self) -> FeatureViewProto:
350339 tags = self .tags ,
351340 owner = self .owner ,
352341 ttl = (ttl_duration if ttl_duration is not None else None ),
353- online = self .online ,
342+ online_source = self .online ,
354343 batch_source = batch_source_proto ,
355344 stream_source = stream_source_proto ,
356- online_source_proto = online_source_proto
357345 )
358346
359347 return FeatureViewProto (spec = spec , meta = meta )
@@ -395,19 +383,14 @@ def from_proto(cls, feature_view_proto: FeatureViewProto):
395383 if feature_view_proto .spec .HasField ("stream_source" )
396384 else None
397385 )
398- online_source = (
399- DataSource .from_proto (feature_view_proto .spec .online_source )
400- if feature_view_proto .spec .HasField ("online_source" )
401- else None
402- )
403386
404387
405388 feature_view = cls (
406389 name = feature_view_proto .spec .name ,
407390 description = feature_view_proto .spec .description ,
408391 tags = dict (feature_view_proto .spec .tags ),
409392 owner = feature_view_proto .spec .owner ,
410- online = online_source or feature_view_proto .spec .online ,
393+ online = feature_view_proto .spec .online_source ,
411394 ttl = (
412395 timedelta (days = 0 )
413396 if feature_view_proto .spec .ttl .ToNanoseconds () == 0
0 commit comments