For the complete documentation index, see llms.txt. This page is also available as Markdown.

Slack notifications

Recipe — route Stratix evaluation results into a Slack channel by polling and forwarding.

The Stratix platform doesn't ship a native Slack integration today. Customers route by polling SDK results and forwarding to a Slack incoming webhook.

import os, requests
from layerlens import Stratix
client = Stratix()

evaluation = client.evaluations.get(EVAL_ID)

if not evaluation.is_success:
 requests.post(
 os.environ["SLACK_WEBHOOK_URL"],
 json={
 "text": f"⚠️ Stratix evaluation {evaluation.id} status={evaluation.status}",
 "attachments": [{
 "color": "danger",
 "fields": [
 {"title": "Model", "value": evaluation.model_name, "short": True},
 {"title": "Benchmark", "value": evaluation.benchmark_name, "short": True},
 {"title": "Accuracy", "value": str(evaluation.accuracy), "short": True},
 ],
 }],
 },
 timeout=10,
 )

Wire from any scheduler — see daily smoke eval for the scheduling pattern.

See also

Last updated

Was this helpful?