Features as obtained from a feature store. Args: ctx: The click context.
(ctx: click.Context)
| 37 | ) |
| 38 | @click.pass_context |
| 39 | def feature(ctx: click.Context) -> None: |
| 40 | """Features as obtained from a feature store. |
| 41 | |
| 42 | Args: |
| 43 | ctx: The click context. |
| 44 | """ |
| 45 | from zenml.client import Client |
| 46 | from zenml.stack.stack_component import StackComponent |
| 47 | |
| 48 | client = Client() |
| 49 | feature_store_models = client.active_stack_model.components[ |
| 50 | StackComponentType.FEATURE_STORE |
| 51 | ] |
| 52 | if feature_store_models is None: |
| 53 | error( |
| 54 | "No active feature store found. Please create a feature store " |
| 55 | "first and add it to your stack." |
| 56 | ) |
| 57 | return |
| 58 | ctx.obj = StackComponent.from_model(feature_store_models[0]) |
| 59 | |
| 60 | @feature.command("get-data-sources") |
| 61 | @click.pass_obj |
nothing calls this directly
no test coverage detected