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

Function webhook_label_ingest

sdk/python/feast/ui_server.py:625–647  ·  view source on GitHub ↗

Webhook endpoint for external annotation tools (Argilla, Label Studio) to push labels.

(request: WebhookPushRequest)

Source from the content-addressed store, hash-verified

623
624 @rest_app.post("/webhook/label-ingest")
625 def webhook_label_ingest(request: WebhookPushRequest):
626 """Webhook endpoint for external annotation tools (Argilla, Label Studio) to push labels."""
627 try:
628 from datetime import datetime, timezone
629
630 for record in request.records:
631 if "event_timestamp" not in record:
632 record["event_timestamp"] = datetime.now(timezone.utc).isoformat()
633
634 df = pd.DataFrame(request.records)
635 store.push(
636 request.push_source_name,
637 df,
638 to=feast.data_source.PushMode.ONLINE_AND_OFFLINE,
639 )
640 return {
641 "status": "ok",
642 "records_ingested": len(request.records),
643 "push_source": request.push_source_name,
644 }
645 except Exception:
646 logger.exception("Webhook label ingest failed")
647 return _safe_error_response("Webhook label ingest")
648
649 class TrainingExportRequest(BaseModel):
650 feature_service: str

Callers

nothing calls this directly

Calls 3

_safe_error_responseFunction · 0.85
pushMethod · 0.80
exceptionMethod · 0.80

Tested by

no test coverage detected