Skip to main content

Marimo Flow - Interactive ML notebooks with MLflow integration

Project description

Marimo Flow ๐ŸŒŠ

Python Marimo MLflow Docker License Code Style

Modern reactive ML development with Marimo notebooks and MLflow experiment tracking

Why Marimo Flow is Powerful ๐Ÿš€

Marimo Flow combines the best of reactive notebook development with robust ML experiment tracking:

  • ๐Ÿ”„ Reactive Development: Marimo's dataflow graph ensures your notebooks are always consistent - change a parameter and watch your entire pipeline update automatically
  • ๐Ÿค– AI-Enhanced Workflow: Built-in GitHub Copilot support and AI assistants accelerate your ML development
  • ๐Ÿ“Š Seamless ML Pipeline: MLflow integration tracks every experiment, model, and metric without breaking your flow

This combination eliminates the reproducibility issues of traditional notebooks while providing enterprise-grade experiment tracking.

Features โœจ

  • ๐Ÿ““ Marimo Reactive Notebooks: Git-friendly .py notebooks with automatic dependency tracking
  • ๐Ÿ”ฌ MLflow Experiment Tracking: Complete ML lifecycle management with model registry
  • ๐Ÿณ Docker Deployment: One-command setup with docker-compose
  • ๐Ÿ’พ SQLite Backend: Lightweight, file-based storage for experiments
  • ๐ŸŽฏ Interactive ML Development: Real-time parameter tuning with instant feedback

Quick Start ๐Ÿƒโ€โ™‚๏ธ

With Docker (Recommended)

# Clone and start services
git clone <repository-url>
cd marimo-flow
docker-compose up -d

# Access services
# Marimo: http://localhost:2718
# MLflow: http://localhost:5000

Local Development

# Install dependencies
uv sync

# Start MLflow server
uv run mlflow server --host 0.0.0.0 --port 5000 --backend-store-uri sqlite:///data/mlflow/db/mlflow.db --default-artifact-root ./data/mlflow/artifacts

# Start Marimo (in another terminal)
uv run marimo edit examples/

Example Notebooks ๐Ÿ“š

Explore our focused, production-ready notebooks:

๐Ÿš€ Basic ML Workflow

  • Simple classification with Random Forest
  • Real-time parameter tuning
  • MLflow experiment tracking
  • Interactive visualizations

๐Ÿ† Model Comparison

  • Compare multiple algorithms (RF, GB, LR, SVM)
  • Cross-validation analysis
  • Performance benchmarking
  • Built-in datasets (Wine, Iris, Breast Cancer)

๐Ÿ” Data Exploration

  • Interactive statistical analysis
  • Correlation heatmaps
  • Distribution visualizations
  • PCA and t-SNE dimensionality reduction

Each notebook demonstrates reactive development principles and follows Marimo best practices for maintainable, reproducible ML code.

Project Structure ๐Ÿ“

marimo-flow/
โ”œโ”€โ”€ examples/                    # Marimo notebooks
โ”‚   โ”œโ”€โ”€ 01_basic_ml_workflow.py     # Basic ML pipeline
โ”‚   โ”œโ”€โ”€ 02_model_comparison.py      # Multi-model comparison
โ”‚   โ””โ”€โ”€ 03_data_exploration.py      # Interactive data analysis
โ”œโ”€โ”€ data/
โ”‚   โ””โ”€โ”€ mlflow/                  # MLflow storage
โ”‚       โ”œโ”€โ”€ artifacts/           # Model artifacts
โ”‚       โ”œโ”€โ”€ db/                  # SQLite database
โ”‚       โ””โ”€โ”€ prompts/             # Prompt templates
โ”œโ”€โ”€ docker-compose.yaml          # Service orchestration
โ”œโ”€โ”€ Dockerfile                   # Container definition
โ”œโ”€โ”€ pyproject.toml              # Dependencies
โ””โ”€โ”€ README.md                   # This file

Configuration โš™๏ธ

Environment Variables

  • MLFLOW_TRACKING_URI: MLflow server URL (default: http://localhost:5000)
  • MLFLOW_BACKEND_STORE_URI: Database connection string
  • MLFLOW_DEFAULT_ARTIFACT_ROOT: Artifact storage location

Docker Services

  • Marimo: Port 2718 - Interactive notebook environment
  • MLflow: Port 5000 - Experiment tracking UI

Pre-installed ML & Data Science Stack ๐Ÿ“ฆ

Machine Learning & Scientific Computing

  • scikit-learn ^1.5.2 - Machine learning library
  • NumPy ^2.1.3 - Numerical computing
  • pandas ^2.2.3 - Data manipulation and analysis
  • PyArrow ^18.0.0 - Columnar data processing
  • SciPy ^1.14.1 - Scientific computing
  • matplotlib ^3.9.2 - Plotting library

High-Performance Data Processing

  • Polars ^1.12.0 - Lightning-fast DataFrame library
  • DuckDB ^1.1.3 - In-process analytical database
  • Altair ^5.4.1 - Declarative statistical visualization

AI & LLM Integration

  • OpenAI ^1.54.4 - GPT API integration
  • FastAPI ^0.115.4 - Modern web framework
  • Pydantic ^2.10.2 - Data validation

Database & Storage

  • SQLAlchemy ^2.0.36 - SQL toolkit and ORM
  • Alembic ^1.14.0 - Database migrations
  • SQLGlot ^25.30.2 - SQL parser and transpiler

Web & API

Development Tools

  • Black ^24.10.0 - Code formatter
  • Ruff ^0.7.4 - Fast Python linter
  • pytest ^8.3.3 - Testing framework
  • MyPy ^1.13.0 - Static type checker

API Endpoints ๐Ÿ”Œ

MLflow REST API

  • Experiments: GET /api/2.0/mlflow/experiments/list
  • Runs: GET /api/2.0/mlflow/runs/search
  • Models: GET /api/2.0/mlflow/registered-models/list

Marimo Server

  • Notebooks: GET / - File browser and editor
  • Apps: GET /run/<notebook> - Run notebook as web app

Contributing ๐Ÿค

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Make your changes following the coding standards
  4. Test your changes: uv run pytest
  5. Submit a pull request

License ๐Ÿ“„

This project is licensed under the MIT License - see the LICENSE file for details.


Built with โค๏ธ using Marimo and MLflow

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

marimo_flow-0.1.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

marimo_flow-0.1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file marimo_flow-0.1.0.tar.gz.

File metadata

  • Download URL: marimo_flow-0.1.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for marimo_flow-0.1.0.tar.gz
Algorithm Hash digest
SHA256 288cc155a9ebdf3b00c15636fa984f9ee3453bc42f23f57c9c73b95b0ba78c4b
MD5 26a9a2853fc6981ad4a2eacf5791962d
BLAKE2b-256 32500404ed8a57e7cd6305c158157489d71da3fa09f2267b43981044aa242e63

See more details on using hashes here.

Provenance

The following attestation bundles were made for marimo_flow-0.1.0.tar.gz:

Publisher: python-publish.yml on bjoernbethge/marimo-flow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file marimo_flow-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: marimo_flow-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for marimo_flow-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1bc5e6e3c695dd7748f562a789becca6697750b5e312c2ff575ae099d182fb55
MD5 1fa71eaac94d3c25f141f71ec8d106ca
BLAKE2b-256 bfaf222c335a3b0402fd5396592398dd031144c06f56041dee571ca524a3e640

See more details on using hashes here.

Provenance

The following attestation bundles were made for marimo_flow-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on bjoernbethge/marimo-flow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page