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
- Import Experiment and declare an experiment name
- Run multiple models inside the same experiment block
- MLens automatically tracks accuracy and model details
- Open dashboard to compare all experiments visually
Demo
Screenshots
Optimizations
Have suggestions? Join the Discord and share your ideas.
Feedback
Join the Discord community: https://discord.gg/svx4Sfckz
Links
Author
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pymlens-1.1.1.tar.gz.
File metadata
- Download URL: pymlens-1.1.1.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cc1d02f0e9011c475451c94417207a49ce6040a82e663e0d5b75fdcc92396b6
|
|
| MD5 |
a90baf13aa6381206323f30d9678c1d8
|
|
| BLAKE2b-256 |
5ad7faec5848398c7eb8cb5c05ce9b4a9cb8d7349d241cf97c15a272a279800c
|
File details
Details for the file pymlens-1.1.1-py3-none-any.whl.
File metadata
- Download URL: pymlens-1.1.1-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
411d2c29e6592d7872a315d55222e21ffd1ec4c0e7115ac0c1c271097a99b1a4
|
|
| MD5 |
23be5622c0b13aec4990bd52ea4a8741
|
|
| BLAKE2b-256 |
c8fb80709d73b6453dfe747e3015a3b331d5aca908714e02d27e5ba448bdf8b9
|