Skip to main content

Lightweight ML experiment tracker — log, compare and visualize your ML experiments locally

Project description

MLens (pymlens)

MLens is a lightweight ML experiment tracking tool that helps data scientists log, compare, and visualize their model experiments — all running fully locally on your machine.

Installation

pip install pymlens

Why MLens

Managing multiple experiments manually becomes chaotic and time-consuming. After running several models, it becomes difficult to track which model performed best and on which problem. MLens eliminates this problem by automatically recording all your experiments in one place.


Features

  • Easy to use — minimal code changes required
  • Runs fully locally — no cloud, no data leaves your machine
  • Server starts automatically — no manual setup needed
  • Records each experiment and their results automatically
  • Compare model performance visually via Streamlit dashboard
  • Supports vanilla metrics out of the box
  • Preferable for Supervised Learning with Scikit-learn

Requirements

pip install pymlens

All dependencies install automatically.


Usage/Examples

from pymlens import Experiment
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
from sklearn.linear_model import LogisticRegression

x, y = load_iris(return_X_y=True)

with Experiment("Iris_Classification") as exp:
    try:
        xtrain, xval, ytrain, yval = train_test_split(
            x, y, test_size=0.2, random_state=42
        )
        exp.Start_experiment(
            xtrain, ytrain,
            Xtest=xval, ytest=yval,
            model=LogisticRegression()
        )
        exp.Start_experiment(
            xtrain, ytrain,
            Xtest=xval, ytest=yval,
            model=RandomForestClassifier()
        )
    except Exception as e:
        print(f"An error occurred: {e}")
    finally:
        print("Experiment Completed")

View Dashboard

After running experiments, open the dashboard with one command:

python -m pymlens dashboard

Dashboard will open automatically in your browser.


How It Works

  1. Import Experiment and declare an experiment name
  2. Run multiple models inside the same experiment block
  3. MLens automatically tracks accuracy and model details
  4. Open dashboard to compare all experiments visually

Demo

Demo


Screenshots

Screenshot 1 Screenshot 2 Screenshot 3 Screenshot 4 Screenshot 5 Screenshot 6


Optimizations

Have suggestions? Join the Discord and share your ideas.


Feedback

Join the Discord community: https://discord.gg/svx4Sfckz


Links

portfolio


Author

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

pymlens-0.1.9.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

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

pymlens-0.1.9-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file pymlens-0.1.9.tar.gz.

File metadata

  • Download URL: pymlens-0.1.9.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for pymlens-0.1.9.tar.gz
Algorithm Hash digest
SHA256 8e581eb54e1e1c18be9a9aac06abdf44a6445391805ed4db1c11a3f2f767d86b
MD5 158ec6339e33b45c4c71362c70a79043
BLAKE2b-256 8ac9f6776b1e7dbfc729a33412c8d7178ac4e00220a8e120403bc3deb844b107

See more details on using hashes here.

File details

Details for the file pymlens-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: pymlens-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for pymlens-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 de777397f4f5a2c45d0cf5dea13fd4e85338adf759b51adca66e2c4af779d681
MD5 03bcbb9fd1538d9557b752ae42fd1615
BLAKE2b-256 7e75069244608552a92584f4e92d1cb8860ab5049165c96cd0a0a4be5b5d5480

See more details on using hashes here.

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