360 Secure SkillHub
360 安全技能中心

MLOps Automation

该 Skill 以文档加模板形式提供 MLOps 配置:just 任务运行器、多阶段 Docker 构建、GitHub Actions 的 lint/测试/构建流水线,以及 MLflow 实验跟踪代码示例,供用户复制到目标项目并按步骤执行。

guohongbin-git
guohongbin-git
热度 76.70
最近更新 2026-05-11 17:26:14
分类:开发依赖:代码执行 / 读写文件应用场景:DevOps / 自动化脚本 / 模板 / 工作流

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add mlops-automation-cn
Metadata
name
mlops-automation-cn
version
1.0.0
description
Task automation, containerization, CI/CD, and experiment tracking
license
MIT

MLOps Automation 🤖

Automate tasks, containers, CI/CD, and ML experiments.

Features

1. Task Runner (just) ⚡

Copy justfile:

cp references/justfile ../your-project/

Tasks:

  • just check - Run all checks
  • just test - Run tests
  • just build - Build package
  • just clean - Remove artifacts
  • just train - Run training

2. Docker 🐳

Multi-stage build:

cp references/Dockerfile ../your-project/
docker build -t my-model .
docker run my-model

Optimizations:

  • Layer caching (uv sync before copy src/)
  • Minimal runtime image
  • Non-root user

3. CI/CD (GitHub Actions) 🔄

Automated pipeline:

cp references/ci-workflow.yml ../your-project/.github/workflows/ci.yml

Runs on push/PR:

  • Lint (Ruff + MyPy)
  • Test (pytest + coverage)
  • Build (package + Docker)

Quick Start

# Setup task runner
cp references/justfile ./

# Setup CI
mkdir -p .github/workflows
cp references/ci-workflow.yml .github/workflows/ci.yml

# Setup Docker
cp references/Dockerfile ./

# Test locally
just check
docker build -t test .

MLflow Tracking

import mlflow

mlflow.autolog()
with mlflow.start_run():
    mlflow.log_param("lr", 0.001)
    model.fit(X, y)
    mlflow.log_metric("accuracy", acc)

Author

Converted from MLOps Coding Course

Changelog

v1.0.0 (2026-02-18)

  • Initial OpenClaw conversion
  • Added justfile template
  • Added Dockerfile
  • Added CI workflow