@@ -57,15 +57,19 @@ def wrapper(
5757 registry_proto : RegistryProto ,
5858 project : str ,
5959 tags : Optional [dict [str , str ]],
60+ ** kwargs ,
6061 ):
6162 nonlocal cache_key , cache_value
6263
63- key = tuple ([id (registry_proto ), registry_proto .version_id , project , tags ])
64+ kwargs_key = tuple (sorted (kwargs .items ())) if kwargs else ()
65+ key = tuple (
66+ [id (registry_proto ), registry_proto .version_id , project , tags , kwargs_key ]
67+ )
6468
6569 if key == cache_key :
6670 return cache_value
6771 else :
68- cache_value = func (registry_proto , project , tags )
72+ cache_value = func (registry_proto , project , tags , ** kwargs )
6973 cache_key = key
7074 return cache_value
7175
@@ -279,54 +283,70 @@ def list_feature_services(
279283
280284@registry_proto_cache_with_tags
281285def list_all_feature_views (
282- registry_proto : RegistryProto , project : str , tags : Optional [dict [str , str ]]
286+ registry_proto : RegistryProto ,
287+ project : str ,
288+ tags : Optional [dict [str , str ]],
289+ skip_udf : bool = False ,
283290) -> List [BaseFeatureView ]:
284291 return (
285- list_feature_views (registry_proto , project , tags )
286- + list_stream_feature_views (registry_proto , project , tags )
287- + list_on_demand_feature_views (registry_proto , project , tags )
292+ list_feature_views (registry_proto , project , tags , skip_udf = skip_udf )
293+ + list_stream_feature_views (registry_proto , project , tags , skip_udf = skip_udf )
294+ + list_on_demand_feature_views (registry_proto , project , tags , skip_udf = skip_udf )
288295 )
289296
290297
291298@registry_proto_cache_with_tags
292299def list_feature_views (
293- registry_proto : RegistryProto , project : str , tags : Optional [dict [str , str ]]
300+ registry_proto : RegistryProto ,
301+ project : str ,
302+ tags : Optional [dict [str , str ]],
303+ skip_udf : bool = False ,
294304) -> List [FeatureView ]:
295305 feature_views : List [FeatureView ] = []
296306 for feature_view_proto in registry_proto .feature_views :
297307 if feature_view_proto .spec .project == project and utils .has_all_tags (
298308 feature_view_proto .spec .tags , tags
299309 ):
300- feature_views .append (FeatureView .from_proto (feature_view_proto ))
310+ feature_views .append (
311+ FeatureView .from_proto (feature_view_proto , skip_udf = skip_udf )
312+ )
301313 return feature_views
302314
303315
304316@registry_proto_cache_with_tags
305317def list_stream_feature_views (
306- registry_proto : RegistryProto , project : str , tags : Optional [dict [str , str ]]
318+ registry_proto : RegistryProto ,
319+ project : str ,
320+ tags : Optional [dict [str , str ]],
321+ skip_udf : bool = False ,
307322) -> List [StreamFeatureView ]:
308323 stream_feature_views = []
309324 for stream_feature_view in registry_proto .stream_feature_views :
310325 if stream_feature_view .spec .project == project and utils .has_all_tags (
311326 stream_feature_view .spec .tags , tags
312327 ):
313328 stream_feature_views .append (
314- StreamFeatureView .from_proto (stream_feature_view )
329+ StreamFeatureView .from_proto (stream_feature_view , skip_udf = skip_udf )
315330 )
316331 return stream_feature_views
317332
318333
319334@registry_proto_cache_with_tags
320335def list_on_demand_feature_views (
321- registry_proto : RegistryProto , project : str , tags : Optional [dict [str , str ]]
336+ registry_proto : RegistryProto ,
337+ project : str ,
338+ tags : Optional [dict [str , str ]],
339+ skip_udf : bool = False ,
322340) -> List [OnDemandFeatureView ]:
323341 on_demand_feature_views = []
324342 for on_demand_feature_view in registry_proto .on_demand_feature_views :
325343 if on_demand_feature_view .spec .project == project and utils .has_all_tags (
326344 on_demand_feature_view .spec .tags , tags
327345 ):
328346 on_demand_feature_views .append (
329- OnDemandFeatureView .from_proto (on_demand_feature_view )
347+ OnDemandFeatureView .from_proto (
348+ on_demand_feature_view , skip_udf = skip_udf
349+ )
330350 )
331351 return on_demand_feature_views
332352
0 commit comments