MLOps Industrialization

Convert prototype notebooks into distributable Python packages with src layout.

1.4k|198|Updated Jun 23, 2023
One-click install
npx skills add https://github.com/fmind/mlops-python-package --skill mlops-industrialization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: MLOps Industrialization
Source: https://github.com/fmind/mlops-python-package/tree/main/.gemini/skills/MLOps%20Industrialization
Command: npx skills add https://github.com/fmind/mlops-python-package --skill mlops-industrialization

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams transform experimental code (notebooks/scripts) into robust, distributable Python packages using a standardized src layout and strict configuration management.

Core Features & Use Cases

  • src layout enforcement: ensures source is contained under src/ to avoid import errors.
  • Hybrid Paradigm: balances domain logic (pure) with an I/O layer (impure) and an orchestration layer.
  • Configuration management: uses OmegaConf and Pydantic to decouple config from code and validate inputs.
  • CLI entrypoints: defines installable CLI tools via pyproject.toml and [project.scripts].
  • Use Case: packaging a prototype into a distributable Python package ready for CI/CD and deployment.

Quick Start

Create a minimal project structure with a pyproject.toml and a src/ package, then run the packaging workflow to produce a distributable package.

Frequently Asked Questions about MLOps Industrialization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert Python notebooks into a distributable package?

To convert Python notebooks into a distributable package, transition your prototype code into a standardized src/ layout with modular domain and I/O layers. This structure enables proper packaging and deployment via a pyproject.toml file.

Why use a src layout for Python packaging?

Using a src layout for Python packaging ensures your source code is contained strictly under the src/ directory to avoid local import errors during development. It separates pure domain logic from impure I/O and orchestration layers cleanly.

How do I manage configuration in a Python package with OmegaConf and Pydantic?

You manage configuration in a Python package with OmegaConf and Pydantic by decoupling config files from your code and validating inputs strictly. This approach maintains robust configuration management without hardcoding variables in scripts.

How do I register a CLI entry point in pyproject.toml?

You register a CLI entry point in pyproject.toml by defining your executable commands under the [project.scripts] table. This creates installable CLI tools ready for CI/CD pipelines and production deployment.

What's the best way to structure Python code for CI/CD and deployment?

The best way to structure Python code for CI/CD and deployment is enforcing a src layout with modular domain, I/O, and application layers. Combining this with strict configuration management produces a robust, distributable Python package.

Do I need pyproject.toml to package a Python prototype?

Yes, you need a pyproject.toml file to package a Python prototype into a distributable format. It defines your project metadata, dependencies, and CLI entry points required for standard Python packaging workflows.