pytest-ml-tester
ML-specific testing skill using pytest with fixtures for data, models, and predictions.
它会碰到什么
扫了多少2 个文本文件,5 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0
这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。
技能内容
pytest-ml-tester
Overview
ML-specific testing skill using pytest with specialized fixtures for data validation, model loading, prediction testing, and ML pipeline verification.
Capabilities
- Data validation fixtures
- Model loading fixtures
- Prediction testing utilities
- Performance regression tests
- Integration test helpers
- Coverage reporting for ML code
- Property-based testing with Hypothesis
- Parameterized test generation
Target Processes
- ML System Integration Testing
- Model Evaluation and Validation Framework
- Data Collection and Validation Pipeline
Tools and Libraries
- pytest
- pytest-cov
- hypothesis
- great-expectations (optional)
Input Schema
{
"type": "object",
"required": ["action"],
"properties": {
"action": {
"type": "string",
"enum": ["run", "generate", "coverage", "fixtures"],
"description": "Testing action to perform"
},
"testConfig": {
"type": "object",
"properties": {
"testPath": { "type": "string" },
"markers": { "type": "array", "items": { "type": "string" } },
"verbose": { "type": "boolean" },
"failFast": { "type": "boolean" },
"parallel": { "type": "integer" }
}
},
"coverageConfig": {
"type": "object",
"properties": {
"sourcePath": { "type": "string" },
"minCoverage": { "type": "number" },
"reportFormat": { "type": "string", "enum": ["html", "xml", "term"] }
}
},
"generateConfig": {
"type": "object",
"properties": {
"testType": {
"type": "string",
"enum": ["data_validation", "model_inference", "performance", "integration"]
},
"targetPath": { "type": "string" },
"modelPath": { "type": "string" },
"dataPath": { "type": "string" }
}
},
"fixtureConfig": {
"type": "object",
"properties": {
"dataFixtures": { "type": "array" },
"modelFixtures": { "type": "array" },
"scope": { "type": "string", "enum": ["function", "class", "module", "session"] }
}
}
}
}
Output Schema
{
"type": "object",
"required": ["status", "results"],
"properties": {
"status": {
"type": "string",
"enum": ["passed", "failed", "error"]
},
"results": {
"type": "object",
"properties": {
"totalTests": { "type": "integer" },
"passed": { "type": "integer" },
"failed": { "type": "integer" },
"skipped": { "type": "integer" },
"duration": { "type": "number" }
}
},
"failures": {
"type": "array",
"items": {
"type": "object",
"properties": {
"testName": { "type": "string" },
"error": { "type": "string" },
"traceback": { "type": "string" }
}
}
},
"coverage": {
"type": "object",
"properties": {
"percentage": { "type": "number" },
"reportPath": { "type": "string" },
"uncoveredLines": { "type": "object" }
}
},
"generatedTests": {
"type": "array",
"items": { "type": "string" }
}
}
}
Usage Example
{
kind: 'skill',
title: 'Run ML integration tests',
skill: {
name: 'pytest-ml-tester',
context: {
action: 'run',
testConfig: {
testPath: 'tests/integration/',
markers: ['integration', 'model'],
verbose: true,
parallel: 4
},
coverageConfig: {
sourcePath: 'src/',
minCoverage: 80,
reportFormat: 'html'
}
}
}
}想直接用这个技能?
本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。
它属于哪个仓库
星标★ 1,796
本站分层T1
该仓技能数2115
原文件路径
library/specializations/data-science-ml/skills/pytest-ml-tester/SKILL.md