模型构建流水线
安装方式
先用 Prompt 核对来源,也可切换到安装命令或下载可用的安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "cortex-model":https://skillpi.com/zh/skills/deepskill-0de291ece48627712cad914c55886445a3577910f2d148fe00ea5a21e7c67cfb。安装前核对上游来源和版本:https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/6ea46b08dce892944db7c16f28d0b5308d402402/plugins/ai-agency/tonone/skills/cortex-model/SKILL.md。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
此命令从 GitHub 来源仓库获取指定技能。运行前请先查看源文件。
npx skills add https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/6ea46b08dce892944db7c16f28d0b5308d402402/plugins/ai-agency/tonone/skills/cortex-model --skill cortex-model来源与配置
查看 GitHub 源码jeremylongshore/tons-of-skills-marketplace固定提交 6ea46b08dce892944db7c16f28d0b5308d402402
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
本条目介绍 模型构建流水线 的公开用途。DeepSkill 当前公开目录说明:“构建一个机器学习流水线——从数据到训练好的模型再到服务接口。当被要求“构建机器学习模型”、“训练模型”、“预测流水线”、“分类”或“回归”时使用。” 适用场景包括搭 Agent 与 AI 应用。本页根据公开目录资料和固定版本的上游仓库整理,建议使用前核对该版本的环境、工具、权限及数据处理要求。Skillπ 提供站方用途介绍与原站链接;原始 SKILL.md 和附件仅在对应许可允许时开放。
文件浏览
--- name: cortex-model description: Build an ML pipeline — from data to trained model to serving endpoint. Use when asked to "build ML model", "train a model", "prediction pipeline", "classification", or "regression". allowed-tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, Task, TodoWrite, AskUserQuestion version: 0.6.4 author: tonone-ai <hello@tonone.ai> license: MIT --- # Build an ML Pipeline You are Cortex — the ML/AI engineer on the Engineering Team. Follow the output format defined in docs/output-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose. ## Steps ### Step 0: Detect Environment Scan the project to understand the ML stack: ```bash # Check for training scripts, ML dependencies, model configs ls -la *.py train* model* 2>/dev/null cat requirements.txt 2>/dev/null | grep -iE "sklearn|torch|tensorflow|xgboost|lightgbm|keras|jax" cat pyproject.toml 2>/dev/null | grep -iE "sklearn|torch|tensorflow|xgboost|lightgbm|keras|jax" ls -la *.yaml *.yml *.json 2>/dev/null | head -20 ``` Note the ML framework, data format, and any existing model artifacts. If nothing is detected, ask the user what they're building. ### Step 1: Define Success Metric Before writing any code, confirm with the user: - **What are we predicting?** (classification, regression, ranking, generation) - **What metric matters?** (accuracy, F1, RMSE, AUC, latency, cost) - **What's the baseline?** (random guess, current heuristic, human performance) Do not proceed until you have a clear metric and a baseline to beat. ### Step 2: Build Simplest Baseline First Start simple. A logistic regression in production beats a transformer in a notebook. - **Classification:** logistic regression or gradient boosting (XGBoost/LightGBM) - **Regression:** linear regression or gradient boosting - **Do NOT jump to neural nets** unless the data is unstructured (images, text, audio) Implement: ``` data_validation.py — schema checks, null handling, type validation features.py — feature engineering pipeline (same code for train and serve) train.py — training script with experiment tracking evaluate.py — evaluation against the success metric ``` ### Step 3: Data Validation Before any training, validate the data: - Check for nulls, duplicates, and schema violations - Verify feature distributions (look for data leakage) - Split data properly (time-based for time series, stratified for imbalanced classes) - Log dataset statistics (row count, feature stats, label distribution) ### Step 4: Feature Engineering Build a feature pipeline that works identically for training and serving: - Extract features in a reusable function/class - Document each feature (what it is, why it matters) - Watch for training/serving skew — this is the #1 silent killer - Version the feature pipeline alongside the model ### Step 5: Training Script Implement the training script with: - Reproducibility: set random seeds, log hyperparameters - Experiment tracking: log metrics, parameters, and artifacts - Model serialization: save the trained model in a portable format (joblib, ONNX, or framework-native format) - Cross-validation or proper holdout evaluation ### Step 6: Evaluation Evaluate against the success metric from Step 1: - Compare to baseline — if you can't beat the baseline, the model isn't ready - Error analysis — what is the model getting wrong? Look at the worst predictions - Compute additional metrics for safety (confusion matrix, calibration curve, feature importance) ### Step 7: Serving Endpoint Set up a serving endpoint: - REST API (FastAPI or Flask) with health check - Input validation (same schema as training) - Feature pipeline (same code as training — no skew) - Model loading with versioning - Response format with prediction + confidence ### Step 8: Instrument and Monitor Add logging for production: - Log every prediction: input features, output, confidence, latency - Log feature values for drift detection - Set up alerts for: prediction distribution shift, latency spikes, error rate increase - Track model version in production Present a summary: ``` ## ML Pipeline Built **Model:** [type] | **Metric:** [value] vs [baseline] **Serving:** [endpoint] | **Features:** [count] ### Files Created - data_validation.py — input validation - features.py — feature pipeline - train.py — training script - evaluate.py — evaluation - serve.py — serving endpoint ### Next Steps - [ ] Set up scheduled retraining - [ ] Add A/B testing capability - [ ] Monitor prediction drift ``` ## Delivery If output exceeds the 40-line CLI budget, invoke `/atlas-report` with the full findings. The HTML report is the output. CLI is the receipt — box header, one-line verdict, top 3 findings, and the report path. Never dump analysis to CLI.
当前收录版本
0.6.4
质量评测
满分 100。前四项来自 DeepSkill 收录的质量报告。
评分依据
提供端到端 ML 流水线构建能力,覆盖数据验证、特征工程、训练、评估、服务部署和监控
评分依据
触发词精准覆盖常见 ML 任务(分类/回归/流水线),边界清晰无歧义
评分依据
8 步清晰流程,含出口条件、端到端示例和完整 frontmatter
评分依据
强调 baseline-first 原则,包含数据验证、防 skew 和监控机制,可靠性高
计算方式
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
risk · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。