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.0

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.0
File Size Uploaded Provenance Actions
mlplant_cli-0.1.0.tar.gz 9.0 kB Without provenance Details for mlplant_cli-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 20.9 kB

Release files / mlplant_cli-0.1.0.tar.gz

Download URL mlplant_cli-0.1.0.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c1999a771892e21ec475b08d910ce3152ade9254f24d756ec0d06a3cb124d672
BLAKE2b-256 checksum
How to use checksums
7f0aaee42112239f7905ec01c8f48b273d87ba1c54fc6683cedee5a6e162524f
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.0-py3-none-any.whl

Download URL mlplant_cli-0.1.0-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d93fea8a18a2fb338869ffc1c52613e3a155647dd0b925c7a241598a427e555
BLAKE2b-256 checksum
How to use checksums
a872cb5e58e8a6824a0297280ba04640889947c5b69ef91e8d31de0ed6d146a0
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.0

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