name: seldon-model-deployer description: 用于在Kubernetes上进行模型服务、A/B测试和金丝雀部署的Seldon Core部署技能。 allowed-tools:
- Read
- Write
- Bash
- Glob
- Grep
seldon-model-deployer
概述
用于在Kubernetes上进行模型服务、A/B测试、金丝雀部署和高级推理图的Seldon Core部署技能。
能力
- SeldonDeployment的创建和管理
- 多模型服务
- 流量分割(金丝雀/影子/A/B)
- 模型监控集成
- 自定义推理图
- 解释器部署(SHAP、Anchor)
- 请求日志记录和追踪
- 自动扩缩容配置
目标流程
- 带有金丝雀发布的模型部署流水线
- 用于机器学习模型的A/B测试框架
- 机器学习模型再训练流水线
工具和库
- Seldon Core
- Seldon Deploy
- Kubernetes
- Istio/Ambassador(入口)
输入模式
{
"type": "object",
"required": ["action"],
"properties": {
"action": {
"type": "string",
"enum": ["deploy", "update", "rollback", "delete", "status", "traffic-split"],
"description": "要执行的Seldon操作"
},
"deploymentConfig": {
"type": "object",
"properties": {
"name": { "type": "string" },
"namespace": { "type": "string" },
"modelUri": { "type": "string" },
"implementation": { "type": "string" },
"replicas": { "type": "integer" },
"resources": {
"type": "object",
"properties": {
"requests": { "type": "object" },
"limits": { "type": "object" }
}
}
}
},
"trafficConfig": {
"type": "object",
"properties": {
"canaryPercent": { "type": "integer" },
"shadowEnabled": { "type": "boolean" },
"abTestEnabled": { "type": "boolean" }
}
},
"explainerConfig": {
"type": "object",
"properties": {
"type": { "type": "string", "enum": ["anchor_tabular", "anchor_text", "shap"] },
"enabled": { "type": "boolean" }
}
}
}
}
输出模式
{
"type": "object",
"required": ["status", "action"],
"properties": {
"status": {
"type": "string",
"enum": ["success", "error", "pending"]
},
"action": {
"type": "string"
},
"deploymentName": {
"type": "string"
},
"endpoint": {
"type": "string"
},
"deploymentStatus": {
"type": "string",
"enum": ["creating", "available", "failed", "unknown"]
},
"replicas": {
"type": "object",
"properties": {
"desired": { "type": "integer" },
"ready": { "type": "integer" }
}
},
"trafficSplit": {
"type": "object"
}
}
}
使用示例
{
kind: 'skill',
title: '使用金丝雀部署模型',
skill: {
name: 'seldon-model-deployer',
context: {
action: 'deploy',
deploymentConfig: {
name: 'fraud-detector',
namespace: 'ml-serving',
modelUri: 'gs://models/fraud-v2',
implementation: 'SKLEARN_SERVER',
replicas: 3
},
trafficConfig: {
canaryPercent: 10
},
explainerConfig: {
type: 'shap',
enabled: true
}
}
}
}