Skip to main content

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

Project description

PyMLens 🧪

A lightweight ML experiment tracking tool that helps data scientists log, compare, and visualize their model experiments — runs fully locally on your machine.

Installation

pip install pymlens

Why PyMLens

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. PyMLens 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
  • Supports both Classification and Regression problems
  • Records each experiment and results automatically
  • Compare model performance visually via Streamlit dashboard
  • Confusion matrix tracking for classification
  • MSE, MAE, RMSE, R2 tracking for regression
  • Cross validation score tracking
  • Copy model hyperparameters directly from dashboard
  • Interactive Sunburst visualization for experiment exploration
  • Dynamic themes — randomize dashboard appearance

Supported Metrics

Classification

  • Accuracy
  • Precision
  • Recall
  • F1 Score
  • Cross Validation Score
  • Confusion Matrix

Regression

  • MSE (Mean Squared Error)
  • MAE (Mean Absolute Error)
  • RMSE (Root Mean Squared Error)
  • R2 Score
  • Cross Validation Score

Run Locally

Clone the project

git clone https://github.com/munishmalhotra6230/model_tracker-MLENS-.git
cd model_tracker-MLENS-

Install dependencies

pip install -r requirements.txt

Run dashboard

python -m pymlens dashboard

Usage — Classification

from pymlens import Classification_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
from sklearn.svm import SVC

x, y = load_iris(return_X_y=True)
xtrain, xval, ytrain, yval = train_test_split(x, y, test_size=0.2, random_state=42)

with Classification_Experiment("Iris_Classification", xtrain, ytrain, xval, yval) as exp:
    exp.Start_experiment(model=LogisticRegression())
    exp.Start_experiment(model=RandomForestClassifier())
    exp.Start_experiment(model=SVC())

Usage — Regression

from pymlens import Regression_Experiment
from sklearn.datasets import fetch_california_housing
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestRegressor, GradientBoostingRegressor
from sklearn.linear_model import LinearRegression

x, y = fetch_california_housing(return_X_y=True)
xtrain, xval, ytrain, yval = train_test_split(x, y, test_size=0.2, random_state=42)

with Regression_Experiment("House_Price", xtrain, ytrain, xval, yval) as exp:
    exp.Start_experiment(model=LinearRegression())
    exp.Start_experiment(model=RandomForestRegressor())
    exp.Start_experiment(model=GradientBoostingRegressor())

View Dashboard

python -m pymlens dashboard

Dashboard opens automatically in your browser with:

  • Model leaderboard
  • Metric comparison charts
  • Radar view
  • Precision vs Recall scatter (Classification)
  • MSE vs MAE scatter (Regression)
  • Cross validation stability
  • Copy model hyperparameters
  • Interactive Sunburst explorer

Demo


Screenshots

alt text alt text alt text


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-1.1.2.tar.gz (10.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-1.1.2-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pymlens-1.1.2.tar.gz
Algorithm Hash digest
SHA256 924fa16934f4ac2fa1c6d92da0e8b1583225732996ce972c4f5a35246736f524
MD5 77c8da23b19e2001488bf5cac8d73ec1
BLAKE2b-256 4b268b63deafc293f1efcd0f8b173fff7b10aa6c8fc926982754dc702b639399

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pymlens-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 efd7eb56b4926b63c3429d6ee56c39c95f5e8a3671e2f66f9bb828c3f3c3c9d0
MD5 7587721838e74c90b4616c9dff4caa6c
BLAKE2b-256 2fa0bc70e37ab656778f6d3c75c0d205d9e2203c3ad7807389a3bee94f3a5848

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