name: whylabs-monitor description: 用于机器学习可观测性、数据画像记录和生产环境异常检测的WhyLabs集成技能。 allowed-tools:
- Read
- Write
- Bash
- Glob
- Grep
whylabs-monitor
概述
用于生产环境机器学习系统的可观测性、数据画像记录和异常检测的WhyLabs集成技能。
功能
- 数据画像生成(whylogs)
- 画像上传至WhyLabs平台
- 异常检测与告警
- 数据子集的细分分析
- 性能监控仪表板
- 与机器学习流水线集成
- 历史画像对比
- 自定义约束验证
目标流程
- 模型性能监控与漂移检测
- 机器学习系统可观测性与事件响应
工具与库
- whylogs
- WhyLabs平台
- pandas
输入模式
{
"type": "object",
"required": ["action"],
"properties": {
"action": {
"type": "string",
"enum": ["profile", "upload", "compare", "validate", "alert-config"],
"description": "要执行的WhyLabs操作"
},
"profileConfig": {
"type": "object",
"properties": {
"dataPath": { "type": "string" },
"datasetId": { "type": "string" },
"segments": { "type": "array", "items": { "type": "string" } },
"timestamp": { "type": "string" }
}
},
"uploadConfig": {
"type": "object",
"properties": {
"orgId": { "type": "string" },
"modelId": { "type": "string" },
"profilePath": { "type": "string" }
}
},
"compareConfig": {
"type": "object",
"properties": {
"baselineProfile": { "type": "string" },
"targetProfile": { "type": "string" },
"metrics": { "type": "array", "items": { "type": "string" } }
}
},
"validationConfig": {
"type": "object",
"properties": {
"constraints": {
"type": "array",
"items": {
"type": "object",
"properties": {
"column": { "type": "string" },
"constraint": { "type": "string" },
"value": { "type": "number" }
}
}
}
}
}
}
}
输出模式
{
"type": "object",
"required": ["status", "action"],
"properties": {
"status": {
"type": "string",
"enum": ["success", "error", "warning"]
},
"action": {
"type": "string"
},
"profilePath": {
"type": "string"
},
"uploadId": {
"type": "string"
},
"dashboardUrl": {
"type": "string"
},
"comparison": {
"type": "object",
"properties": {
"driftScore": { "type": "number" },
"driftedFeatures": { "type": "array", "items": { "type": "string" } },
"alerts": { "type": "array" }
}
},
"validation": {
"type": "object",
"properties": {
"passed": { "type": "boolean" },
"failures": { "type": "array" }
}
}
}
}
使用示例
{
kind: 'skill',
title: '分析并上传生产环境数据',
skill: {
name: 'whylabs-monitor',
context: {
action: 'profile',
profileConfig: {
dataPath: 'data/production_batch.parquet',
datasetId: 'fraud-detection',
segments: ['region', 'customer_type'],
timestamp: '2024-01-15T00:00:00Z'
},
uploadConfig: {
orgId: 'org-123',
modelId: 'model-fraud-v2'
}
}
}
}