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.5.tar.gz (11.6 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.5-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pymlens-1.1.5.tar.gz
  • Upload date:
  • Size: 11.6 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.5.tar.gz
Algorithm Hash digest
SHA256 fc044f60e5e9119f4a215ba394b66065df16781a0b66afdd17b92492692083c8
MD5 d8a1615995101b21b308f27773530cce
BLAKE2b-256 fac881e686506227c7d9c64f820d47fb6a042f1a8d2bc5e9302adde1d9acd00b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymlens-1.1.5-py3-none-any.whl
  • Upload date:
  • Size: 11.3 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7a7cee7574f9ad92c1aaa2f0ee98d46e98c391e0f82c6680034917400315e3eb
MD5 bb085e4741b060fd9552a7b6d998ece3
BLAKE2b-256 0d667a31e9c7cbc0cfc7f7637de190908ba950ced395f125e70df3b446798b65

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