AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

MLOps Industrialization

skill-mlops-courses-mlops-coding-skills-mlops-industrialization · by MLOps-Courses

Guide to transform prototypes into robust, distributable Python packages using the src layout, hybrid paradigm, and strict configuration management.

No reviews yet
0 installs
40 views
0.0% view→install

Install

$ agentstack add skill-mlops-courses-mlops-coding-skills-mlops-industrialization

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-mlops-courses-mlops-coding-skills-mlops-industrialization)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of MLOps Industrialization? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

MLOps Coding - Productionizing Skill

Goal

To convert experimental code (notebooks/scripts) into a high-quality, distributable Python package. This skill enforces the src/ layout, a Hybrid Paradigm (OOP structure + Functional purity), and Strict Configuration to ensure scalability, security, and maintainability.

Prerequisites

  • Language: Python
  • Manager: uv
  • Context: Moving from notebooks/ to src/.

Instructions

1. Packaging Structure (src Layout)

Adopt the src layout to prevent import errors and separate source from tooling.

  1. Directory Tree:

``text my-project/ ├── pyproject.toml # Dependencies & Metadata ├── uv.lock ├── README.md └── src/ └── my_package/ # Main package directory ├── __init__.py ├── io/ # Side-effects (Datasets, APIs) ├── domain/ # Pure business logic (Models, Features) └── application/ # Orchestration (Training loops, Inference) ``

  1. Configuration: Use pyproject.toml for all build metadata and dependencies.

2. Modularity & Paradigm (Hybrid Style)

Balance structure with predictability.

  1. Domain Layer (Pure):
  • Rule: Code here must be deterministic and free of side effects (no I/O).
  • Use Case: Feature transformations, Model architecture definitions.
  • Style: Functional (pure functions) or Immutable Objects (dataclasses).
  1. I/O Layer (Impure):
  • Rule: Isolate external interactions here.
  • Use Case: Loading data from S3, saving models to disk, logging to MLflow.
  • Style: OOP (Classes to manage connections/state).
  1. Application Layer (Orchestration):
  • Rule: Wire Domain and I/O together.
  • Use Case: Tuning, Training, Inference, Evaluation, etc.

3. Application Entrypoints

Create standard, installable CLI tools.

  1. Define Script: Create src/my_package/scripts.py with a main() function.
  2. Register: Add to pyproject.toml:

``toml [project.scripts] my-tool = "my_package.scripts:main" ``

  1. CLI Execution:
  • Dev: uv run my-tool (No install needed).
  • Prod: pip install . -> my-tool (Installed on PATH).
  1. Guard: Always use if __name__ == "__main__": in scripts to prevent execution on import.

4. Configuration Management

Decouple settings from code using OmegaConf (Parsing) and Pydantic (Validation).

  1. Define Schema (Pydantic):
  • Create a class that defines expected types and defaults.

```python from pydantic import BaseModel

class TrainingConfig(BaseModel): batchsize: int = 32 learningrate: float = 0.001 use_gpu: bool = False ```

  1. Parse & Validate (OmegaConf):
  • Load YAML, merge with CLI args, and validate against the schema.

```python import omegaconf

# 1. Load YAML conf = omegaconf.OmegaConf.load("config.yaml") # 2. Merge with CLI (optional) cliconf = omegaconf.OmegaConf.fromcli() merged = omegaconf.OmegaConf.merge(conf, cliconf) # 3. Validate -> Returns a validated Pydantic object cfg: TrainingConfig = TrainingConfig(**omegaconf.OmegaConf.tocontainer(merged)) ```

  1. Secrets: Use Environment Variables (os.getenv), never commit them.

5. Documentation & Quality

Make code usable and maintainable.

  1. Docstrings: Use Google Style docstrings for all modules, classes, and functions.

```python def calculatemetric(ytrue: np.ndarray, y_pred: np.ndarray) -> float: """Calculates the accuracy score.

Args: ytrue: Ground truth labels. ypred: Predicted labels.

Returns: The accuracy as a float between 0 and 1. """ ```

  1. Type Hints: Use standard python typing (typing, list[str]) everywhere.

6. Best Practices Summary

  • Config != Code: Never hardcode paths or hyperparams; use the Pydantic + OmegaConf pattern.
  • Entrypoints are APIs: Design your CLI ([project.scripts]) as the public interface for your automation tools.
  • Immutable Core: Keep your domain logic side-effect free; push I/O to the edges.

Self-Correction Checklist

  • [ ] No Side Effects on Import: Does import my_package run any code? (It shouldn't).
  • [ ] Src Layout: Is code inside src/?
  • [ ] Config Safety: Are secrets excluded from pyproject.toml and YAML?
  • [ ] Typing: Are function signatures fully type-hinted?
  • [ ] Entrypoints: Is the CLI registered in pyproject.toml?

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.