360 Secure SkillHub
360 安全技能中心

MLOps Industrialization

提供 shell 脚本按给定包名创建 src/ 布局,生成 domain(纯业务逻辑)、io(外部交互)与 application(编排)三层模块文件,并在文档中说明训练与推理的代码组织方式,用于把 notebook 原型整理为可分发的 Python 包。未包含具体实现代码与部署配置。

guohongbin-git
guohongbin-git
热度 65.53
最近更新 2026-05-17 12:17:42
分类:开发依赖:代码执行 / 读写文件应用场景:代码生成 / 自动化脚本 / 模板

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add mlops-industrialization-cn
Metadata
name
mlops-industrialization-cn
version
1.0.0
description
Transform prototypes into distributable Python packages
license
MIT

MLOps Industrialization 🏭

Convert notebooks to production packages.

Features

1. Package Structure Generator 📦

Create src/ layout:

./scripts/create-package.sh my_package

Creates:

src/my_package/
├── __init__.py
├── io/          # I/O operations
├── domain/      # Pure business logic
└── application/ # Orchestration

2. Three-Layer Architecture 🏗️

Domain (Pure)

  • No I/O, no side effects
  • Feature transformations
  • Pure functions or immutable objects

I/O (Impure)

  • External interactions
  • Load data, save models
  • Classes for state management

Application

  • Wire Domain + I/O
  • Training loops, inference

Quick Start

# Create package structure
./scripts/create-package.sh my_ml_package

# Add CLI entrypoint to pyproject.toml:
# [project.scripts]
# train = "my_ml_package.application.train:main"

Key Files

Generated files:

  • src/my_package/domain/features.py - Feature engineering
  • src/my_package/io/data.py - Data loading/saving
  • src/my_package/application/train.py - Training pipeline

Author

Converted from MLOps Coding Course

Changelog

v1.0.0 (2026-02-18)

  • Initial OpenClaw conversion
  • Added package generator