MCPcopy
hub / github.com/zenml-io/zenml / feature

Function feature

src/zenml/cli/feature.py:39–58  ·  view source on GitHub ↗

Features as obtained from a feature store. Args: ctx: The click context.

(ctx: click.Context)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

ClientClass · 0.90
errorFunction · 0.90
from_modelMethod · 0.45

Tested by

no test coverage detected