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.3.tar.gz (13.7 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.3-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pymlens-1.1.3.tar.gz
  • Upload date:
  • Size: 13.7 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.3.tar.gz
Algorithm Hash digest
SHA256 52e3b49d191fb18a029ef0c79c2adf3e55b8bfd1162283bb273f17f5f33c425c
MD5 f53728e499044be3e7ceaed6e439e8ba
BLAKE2b-256 10c49f69024e3e5c678e1b9d1264f93d537ea64530c7a204e5c2518c1e07ed4e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymlens-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 13.2 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2e7bd118b6786e901badd267d40ba70c3269545a002ab2ab583ed79511f40ee0
MD5 fe74a5f1089a205db3f61e571670d789
BLAKE2b-256 9a1c90e33bb98b95aa85481a6dbce3f6fb1f6073589c6af268f1e1b9cc5254a4

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