(
registry: "BaseRegistry",
name: str,
project: str,
allow_cache: bool = False,
)
| 278 | |
| 279 | |
| 280 | def get_feature_view_from_registry( |
| 281 | registry: "BaseRegistry", |
| 282 | name: str, |
| 283 | project: str, |
| 284 | allow_cache: bool = False, |
| 285 | ) -> FeatureViewLike: |
| 286 | try: |
| 287 | return registry.get_feature_view(name, project, allow_cache=allow_cache) |
| 288 | except FeatureViewNotFoundException: |
| 289 | try: |
| 290 | return registry.get_on_demand_feature_view( |
| 291 | name, project, allow_cache=allow_cache |
| 292 | ) |
| 293 | except (FeatureViewNotFoundException, OnDemandFeatureViewNotFoundException): |
| 294 | try: |
| 295 | return registry.get_stream_feature_view( |
| 296 | name, project, allow_cache=allow_cache |
| 297 | ) |
| 298 | except FeatureViewNotFoundException as e: |
| 299 | raise FeastObjectNotFoundException( |
| 300 | f"Can't recognize feast object with a name {name}" |
| 301 | ) from e |
no test coverage detected