Lightweight ML experiment tracker — log, compare and visualize your ML experiments locally
Project description
MLens
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.
Requirements
Before using MLens, make sure these are installed:
pip install flask requests scikit-learn streamlit
Run Locally
Clone the project
git clone https://github.com/munishmalhotra6230/model_tracker-MLENS-.git
Go to the project directory
cd model_tracker-MLENS-
Install dependencies
pip install -r requirements.txt
Start the server — IMPORTANT: Server must be running before training
cd backend_monitoring python backend.py
Run test scripts
python test_scripts.py
View results on dashboard
streamlit run dashboard.py
Features
- Easy to use — minimal code changes required
- Runs fully locally — no cloud, no data leaves your machine
- 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
How to Use MLens
- Start the backend server first
- Declare an experiment with a meaningful name
- Run multiple models inside the same experiment
- View and compare results on the Streamlit dashboard
Demo
Screenshots
Usage/Examples
# Step 1 — Start server first in a separate terminal:
# cd backend_monitoring && python backend.py
# Step 2 — Use in your training code:
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")
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-0.1.4.tar.gz.
File metadata
- Download URL: pymlens-0.1.4.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a0e9bd8c5dfadfed7e62e13f8400f673450b78946cd647739e8de1b28a3c21a
|
|
| MD5 |
da6b96c399f17a6ea91066d5ca59d668
|
|
| BLAKE2b-256 |
ecd8d965ede798bb8da9903535f761d76f9d4bbe229903afeca6f5b2dbb4c437
|
File details
Details for the file pymlens-0.1.4-py3-none-any.whl.
File metadata
- Download URL: pymlens-0.1.4-py3-none-any.whl
- Upload date:
- Size: 4.8 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 |
28f17be131346649db0a81036002304f5f37de61bfaea35d0fc63b659fd43216
|
|
| MD5 |
5c72b0e3c082ad840f98ec60d4afdae7
|
|
| BLAKE2b-256 |
cad85d59da9e910cb01679742a637eb3d9dd95e3c82a1bd86efccc16057cebc6
|