Skip to main content

mlplant-white

mlplant is an MLOps framework that converts exploratory Jupyter notebooks into production-ready FastAPI projects using in-cell annotations.

Installation

pip install mlplant-cli

How to use

1. Annotate your notebook

Use Python decorators directly on functions inside your notebook cells:

import mlplant

@mlplant.config
def _():
    LEARNING_RATE = 0.01
    N_ESTIMATORS = 100
@mlplant.features
def _():
    X["new_feature"] = X["a"] / X["b"]
@mlplant.predict
def predict(data: dict):
    return model.predict([list(data.values())])[0]

Cells with the same decorator are automatically merged into a single output file. Visual noise (matplotlib, seaborn, print, display) is stripped automatically.

2. Build the project

# as a direct command (after installation)
mlplant build my_notebook.ipynb --output ./api --port 8080 --title "My API" --docker

# or via python -m (works anywhere)
python -m mlplant build my_notebook.ipynb --output ./api --docker

3. Inspect detected steps

mlplant inspect my_notebook.ipynb

# or
python -m mlplant inspect my_notebook.ipynb

Supported decorators

Decorator Generated file Purpose
@mlplant.config src/config.py Hyperparameters and constants
@mlplant.load_data src/data_loader.py Data ingestion
@mlplant.preprocessing src/preprocessing.py Cleaning and null handling
@mlplant.features src/features.py Feature engineering
@mlplant.train src/trainer.py Model training
@mlplant.evaluate src/evaluate.py Metrics and evaluation
@mlplant.artifacts src/artifacts.py Model serialization
@mlplant.predict src/predict.py Inference function (exposed at /predict)

Build flags

mlplant build <notebook> [OPTIONS]

  --output / -o   Output directory             (default: ./output)
  --port          Server port                  (default: 8000)
  --title         Swagger UI title             (default: "mlplant API")
  --workers       Uvicorn workers              (default: 1)
  --docker        Generate optimized Dockerfile
  --mlflow        Inject MLflow tracking into training

Metadata

Release files for mlplant-cli 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mlplant-cli 0.1.1
File Size Uploaded Provenance Actions
mlplant_cli-0.1.1.tar.gz 10.4 kB Without provenance Details for mlplant_cli-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mlplant-cli 0.1.1
File Interpreter ABI Platform Actions
mlplant_cli-0.1.1-py3-none-any.whl Python 3 none any Details for mlplant_cli-0.1.1-py3-none-any.whl

Total release size: 23.8 kB

Release files / mlplant_cli-0.1.1.tar.gz

Download URL mlplant_cli-0.1.1.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
775629849b400683250adb117ae0e8a6d88e3b9493e3c54582dd0db0de12f419
BLAKE2b-256 checksum
How to use checksums
0a04bf4f57516a16c553d13679a7e970dd147dd3bd5ea53f05aee4e239e35a10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / mlplant_cli-0.1.1-py3-none-any.whl

Download URL mlplant_cli-0.1.1-py3-none-any.whl
Size 13.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
654659e9b52fe7aec8b73b84ca6557a00b13b10967b1e74440c022ab87cff12f
BLAKE2b-256 checksum
How to use checksums
ef67bd754e1756e7c15a96aeff660ce90d40e6866bcdc0ace1627caa022a296a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for mlplant-cli 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page