MCPcopy Index your code
hub / github.com/feast-dev/feast / _nb_overview

Function _nb_overview

sdk/python/feast/demos.py:231–326  ·  view source on GitHub ↗
(info: dict[str, Any], yaml_abs: str)

Source from the content-addressed store, hash-verified

229
230
231def _nb_overview(info: dict[str, Any], yaml_abs: str) -> dict[str, Any]:
232 project = info["project"]
233 ost = info["online_store_type"]
234 offst = info["offline_store_type"]
235 auth = info["auth_type"]
236 provider = info["provider"]
237 vector_enabled = info["vector_enabled"]
238
239 cells: list[dict[str, Any]] = [
240 _md(
241 f"# Feature Store Overview — `{project}`\n\n"
242 "Explore the entities, feature views, feature services, and data sources "
243 "registered in this project."
244 ),
245 _md("## 1. Prerequisites"),
246 _code(
247 "# Verify feast installation\nimport feast\nprint(f'Feast version: {feast.__version__}')"
248 ),
249 _md("## 2. Feature Store Path"),
250 _path_setup_cell(yaml_abs),
251 _md(
252 f"## 3. Connect to the Feature Store\n"
253 f"The feature store for project **`{project}`** is configured with:\n\n"
254 f"| Setting | Value |\n"
255 f"|---------|-------|\n"
256 f"| Provider | `{provider}` |\n"
257 f"| Online store | `{ost}` |\n"
258 f"| Offline store | `{offst}` |\n"
259 f"| Auth | `{auth}` |\n"
260 + (
261 f"| Vector search | enabled (embedding dim: {info['embedding_dim']}) |\n"
262 if vector_enabled
263 else ""
264 )
265 ),
266 _code(
267 "from feast import FeatureStore\n"
268 "\n"
269 "store = FeatureStore(fs_yaml_file=FEAST_FS_YAML)\n"
270 "print(f'Connected to project: {store.project}')"
271 ),
272 _apply_md(info),
273 _apply_code(info),
274 _md("## 5. List Entities"),
275 _code(
276 "entities = store.list_entities()\n"
277 "print(f'Found {len(entities)} entity/entities\\n')\n"
278 "for e in entities:\n"
279 " print(f' • {e.name} (join_key={e.join_key}, type={e.value_type})')"
280 ),
281 _md("## 6. List Feature Views"),
282 _code(
283 "feature_views = store.list_feature_views()\n"
284 "print(f'Found {len(feature_views)} batch feature view(s)\\n')\n"
285 "for fv in feature_views:\n"
286 " feature_names = [f.name for f in fv.features]\n"
287 " print(f' • {fv.name}')\n"
288 " print(f' Features : {feature_names}')\n"

Callers 1

copy_demo_notebooksFunction · 0.85

Calls 6

_mdFunction · 0.85
_codeFunction · 0.85
_path_setup_cellFunction · 0.85
_apply_mdFunction · 0.85
_apply_codeFunction · 0.85
_notebookFunction · 0.85

Tested by

no test coverage detected