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.4.tar.gz (11.5 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.4-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pymlens-1.1.4.tar.gz
  • Upload date:
  • Size: 11.5 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.4.tar.gz
Algorithm Hash digest
SHA256 a21d3d0446c1ba9844a19e61885a20b1114d95c22c5e49f6064a4a85d0220b3c
MD5 2658e2914a80ded865ce81d65754e6a5
BLAKE2b-256 97742a8a37a169932dc3e911ad34f341db44fbaa25bf85891a11d053413a6b2b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymlens-1.1.4-py3-none-any.whl
  • Upload date:
  • Size: 11.1 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5ebb6c26f2f90450ec27d97163a2b62cf6e8a7bc37ff7ac0bc9125fc394337ec
MD5 499bfeca3ead1d9ebda0d84635950207
BLAKE2b-256 fb30ecded1329385c908f972d2259dc273475afc9d21a9eee46a9221da6c89c9

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