Mlops automation
Agent skills based on the MLOps Coding Course
npx -y skills add MLOps-Courses/mlops-coding-skills --skill mlops-automationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 19 stars19 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Guide to refine MLOps projects with task automation, containerization, CI/CD pipelines, and robust experiment tracking.
SKILL.md
4.1 KB, as published. Nobody here has run it
MLOps Automation
Goal
To elevate the codebase to production standards by adding Task Automation (mise), Git Hooks (lefthook), Containerization (docker), CI/CD (github-actions), and Experiment Tracking (mlflow).
Prerequisites
- Language: Python 3.14
- Manager:
uv - Context: Preparing for scale and deployment.
Instructions
1. Task Automation
Expose a single, shared task vocabulary with mise (replaces just/make).
- Tool:
mise— pins the toolchain and defines tasks inmise.toml. - Vocabulary:
install,format,check,test,build,watch. Run everything viamise run <task>so hooks and CI reuse the same entrypoints. - Core Tasks:
format: Format code and config (ruff format,dprint fmt).check: Static checks (ruff check,ty, security rules).test: Runpytest.build: Build the wheel (uv build).
2. Git Hooks
Catch issues locally with lefthook (replaces pre-commit).
- Framework:
lefthookwith thin hooks — every command delegates to amise runtask so hooks and CI stay identical. - pre-commit: Run
mise run formatthenmise run check. - pre-push: Run
mise run test. - Security: Prefer Ruff
Srules (replacesbandit) pluspip-audit/gitleaks(see the Validation skill), not a separate scanner. - Commits: Enforce Conventional Commits (e.g.,
feat: add new model) sogit-cliffcan generate the changelog.
3. Containerization
Reproducibility anywhere.
- Tool:
docker. - Base Image: Use
python:3.14-slimfor a minimal footprint; installuvin the build stage. - Optimization:
- Layer Caching: Copy
uv.lock+pyproject.tomland runuv syncbefore copyingsrc/. - Multi-stage: Build inputs in one stage, copy only artifacts (
dist/*.whl) to the runtime stage.
- Layer Caching: Copy
- Registry: ask for the company artifact registry, or use
ghcr.iofor GitHub.
4. CI/CD Workflows
Automate verification and release with GitHub Actions.
- Platform: ask for the company CI/CD platform, or use
github-actionsfor GitHub. - Toolchain: Bootstrap every job with
actions/checkout@v7+jdx/mise-action@v4so CI runs the exact samemise runtasks as local hooks. - Workflows:
ci.yml: On push/PR, runmise run format,mise run check,mise run test.cd.yml: On Release, build the image and publish docs via the official GitHub Pages Actions (configure-pages,upload-pages-artifact,deploy-pages).
- Optimization: Use
concurrencyto cancel redundant runs.
5. AI/ML Experiments & Registry
Manage the ML lifecycle with MLflow 3.
- Platform:
MLflow(v3). - Tracking:
- Use
mlflow.autolog(); log metrics, params, and artifacts. - The file store is deprecated — opt in for local runs with
MLFLOW_ALLOW_FILE_STORE=true; use a real backend (SQL/HTTP) in production.
- Use
- Models: Log models with the keyword
name=(e.g.,mlflow.pyfunc.log_model(name=...)). - Validation: Gate promotion with
mlflow.validate_evaluation_resultsagainst explicit metric thresholds. - Registry:
- Register top models manually or via CI.
- Aliases: Use
@championor@productionfor stable deployment pointers. Never rely on moving versions (e.g.,v1->v2).
6. Design Patterns
Write flexible code.
- Strategy: For swappable algorithms (e.g., different model types).
- Factory: For creating objects from config (e.g.,
ModelFactory). - Adapter: For standardizing mismatched interfaces.
Self-Correction Checklist
- Task Vocabulary: Does
mise run check(andformat/test/build) work? - Hooks: Do
lefthookhooks delegate tomise runtasks? - Image: Is the Dockerfile multi-stage on
python:3.14-slim? - CI/CD: Do
ci.yml/cd.ymlbootstrap withjdx/mise-action@v4? - Tracking: Are runs logged to MLflow with validated thresholds?