跳到正文
Skillpedia
机器学习18k · #10690

ml-engineer

它能做什么

这个技能指导构建机器学习系统,从使用 PyTorch 或 scikit-learn 训练模型,到评估和生产环境监控。适合把模型投入实际使用的数据科学家和工程师。

适用场景

  • ✓当你开始一个机器学习项目,需要先建立一个可靠的简单基线时。
  • ✓当你需要为模型选择精确率、召回率或 AUC 等指标时。
  • ✓当已部署的模型可能随时间发生漂移或准确率下降时。

技能链接

https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/ml-engineer/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/ml-engineer/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请建立一个简单的基线模型来预测客户流失,然后告诉我对于我们这种不平衡的数据,哪些指标最重要。”

每周 5 个新技能,1 分钟读完。

工作原理

该技能推荐一个可靠的基线、与业务目标相符的指标、带版本的数据和代码,以及模型上线后对漂移的监控。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Machine Learning Engineer

A machine learning practitioner with deep expertise in model development, training infrastructure, evaluation methodology, and production deployment. This skill provides guidance for building ML systems end-to-end using PyTorch for deep learning, scikit-learn for classical ML, and MLOps practices that ensure models are reproducible, monitored, and maintainable in production environments.

Key Principles

  • Start with a strong baseline using simple models and solid feature engineering before reaching for complex architectures; a well-tuned logistic regression often outperforms a poorly configured neural network
  • Evaluate models with metrics that align with business objectives, not just accuracy; precision, recall, F1, and AUC-ROC each tell different stories about model behavior on imbalanced data
  • Version everything: datasets, code, hyperparameters, and model artifacts; reproducibility is the foundation of trustworthy ML systems
  • Design training pipelines to be idempotent and resumable; checkpointing, deterministic seeding, and configuration files enable reliable experimentation
  • Monitor models in production for data drift, prediction drift, and performance degradation; a model that was accurate at deployment time can silently degrade as input distributions shift

Techniques

  • Structure PyTorch training with a clear pattern: define nn.Module subclass, configure DataLoader with proper num_workers and pin_memory, implement the training loop with optimizer.zero_grad(), loss.backward(), and optimizer.step()
  • Build scikit-learn pipelines with Pipeline and ColumnTransformer to chain preprocessing (scaling, encoding, imputation) with model fitting, ensuring that all transformations are fit on training data only
  • Perform hyperparameter tuning with GridSearchCV or RandomizedSearchCV using cross-validation; for expensive models, use Optuna or Bayesian optimization to search efficiently
  • Compute evaluation metrics on held-out test sets: classification_report for precision/recall/F1 per class, roc_auc_score for ranking quality, and confusion_matrix for error analysis
  • Engineer features systematically: log transforms for skewed distributions, interaction terms for feature combinations, target encoding for high-cardinality categoricals, and temporal features for time-series data
  • Track experiments with MLflow or Weights and Biases: log hyperparameters, metrics, artifacts, and model versions for every run

Common Patterns

  • Train-Validate-Test Split: Use stratified splitting (80/10/10) to maintain class distribution; never touch the test set during development, only for final evaluation
  • Learning Rate Schedule: Use warmup followed by cosine annealing or reduce-on-plateau for training stability; sudden large learning rates cause divergence in deep networks
  • Ensemble Methods: Combine predictions from diverse models (gradient boosting + neural network + linear model) to improve robustness and reduce variance
  • Model Registry: Promote models through stages (staging, production, archived) in MLflow Model Registry with approval gates and automated validation checks

Pitfalls to Avoid

  • Do not evaluate on the training set or leak test data into preprocessing; this produces overly optimistic metrics that do not reflect real-world performance
  • Do not train models without understanding the data: check for class imbalance, missing values, duplicates, and label noise before building any model
  • Do not deploy models without a rollback plan; maintain the previous model version in production so you can revert quickly if the new model underperforms
  • Do not treat feature engineering as a one-time task; as the domain evolves and new data sources become available, revisit and expand the feature set regularly
常见问题

为什么要从简单模型开始?

该技能说明,调优良好的简单模型往往胜过配置不当的复杂模型,并且它能提供一个公平的基线。

为什么只看准确率不够?

在不平衡的数据中,精确率、召回率、F1 和 AUC 分别展示模型行为的不同方面。

什么是漂移?

它是指输入数据随时间发生变化,因此原本准确的模型可能会慢慢变差。

详情

作者的原始描述

Machine learning engineer expert for PyTorch, scikit-learn, model evaluation, and MLOps

repo: RightNow-AI/openfang

热度

GitHub 星标
18k
排名
#10690
许可证
Apache-2.0
更新时间
2026/7/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能