ML Tools

🔧 ML Tools Hub

Connect MLflow, Weights & Biases, TensorBoard, and Hugging Face — all from your lab.

📈

MLflow — Experiment Tracking

Track runs, log parameters, metrics, artifacts. View UI inline or connect to your server.

Configure

Server Connection

🐍

Python Code Snippets

Copy these into the Code Lab to start logging experiments

Install: pip install mlflow

PYTHON
import mlflow
import mlflow.sklearn
from sklearn.linear_model import LogisticRegression

# Set tracking URI (your MLflow server)
mlflow.set_tracking_uri("http://localhost:5000")
mlflow.set_experiment("remesys-classification")

with mlflow.start_run():
    # Log parameters
    mlflow.log_param("model", "LogisticRegression")
    mlflow.log_param("C", 1.0)

    # Train model
    model = LogisticRegression(C=1.0)
    model.fit(X_train, y_train)
    acc = model.score(X_test, y_test)

    # Log metrics & model
    mlflow.log_metric("accuracy", acc)
    mlflow.sklearn.log_model(model, "model")
    print(f"Run logged! Accuracy: {acc:.4f}")

Sample Experiment Runs

Run IDModelAccuracyLossDurationStatus
a3f2e1 RandomForest94.2%0.18212.3s ● Finished
b9c4d2 LogisticReg91.8%0.23400.4s ● Finished
c1d5a7 GradBoost ● Running

↑ Sample data. Connect your MLflow server above to see real experiments.

⚖️

Weights & Biases — Run Tracking

Real-time metrics, model comparison, hyperparameter sweeps, artifact logging.

Embed

W&B Configuration

📉

Training Metrics Visualizer

Simulated — connects to real W&B when configured

Training Loss & Validation Accuracy (Demo)
● train_loss ● val_accuracy ● val_loss
🐍

Python Integration Snippet

Install: pip install wandb

PYTHON
import wandb
from sklearn.ensemble import RandomForestClassifier

# Initialize W&B run
wandb.init(
    project="remesys-ai-lab",
    config={"n_estimators": 100, "max_depth": 5}
)

# Train with logging
for epoch in range(10):
    acc  = train_one_epoch(model, epoch)
    loss = compute_loss(model)
    wandb.log({"accuracy": acc, "loss": loss, "epoch": epoch})

# Save model artifact
artifact = wandb.Artifact("model", type="model")
artifact.add_file("model.pkl")
wandb.log_artifact(artifact)
wandb.finish()
📊

TensorBoard — Training Visualizations

Visualize training metrics, computation graphs, embeddings, and model architecture.

Configure

TensorBoard Server

Setup Guide

Step 1 — Install TensorBoard
BASH
pip install tensorboard tensorflow
Step 2 — Log from Python
PYTHON
import tensorflow as tf

# Set up summary writer
log_dir = "logs/fit/"
writer = tf.summary.create_file_writer(log_dir)

with writer.as_default():
    for step in range(100):
        tf.summary.scalar("loss", loss_value, step=step)
        tf.summary.scalar("accuracy", acc_value, step=step)
Step 3 — Start TensorBoard server
BASH
tensorboard --logdir=logs --host=0.0.0.0 --port=6006
# Then enter URL above and click Embed
🤗

Hugging Face — Model Hub

Browse pre-trained models, datasets, and Spaces. Embed Spaces directly in your lab.

Online

Embed a HF Space or Model

Suggested Models & Spaces for AI Students

🔤

google-bert/bert-base-uncased

Text classification & NLP fundamentals

NLP Classification
🖼️

microsoft/resnet-50

Image classification baseline model

Vision Image Class.
💬

distilbert/distilgpt2

Lightweight text generation for experiments

NLP Generation
🎤

openai/whisper-tiny

Speech recognition — transcribe audio

Audio ASR
🔍

sentence-transformers/all-MiniLM-L6-v2

Sentence embeddings for semantic search

NLP Embeddings
🤖

microsoft/phi-1_5

Small language model, good for demos

NLP LLM
🗄️

DVC — Data Version Control

Version your datasets and ML models alongside code. Works with Git.

Guide
Install DVC
BASH
pip install dvc dvc-s3  # or dvc-gdrive, dvc-ssh
git init
dvc init
Track datasets
BASH
dvc add data/train.csv
git add data/train.csv.dvc .gitignore
git commit -m "Track dataset v1"
dvc push  # push to remote storage
Run ML Pipeline
BASH
dvc run -n train \
  -d data/train.csv -d src/train.py \
  -o models/model.pkl \
  python src/train.py
dvc repro  # reproduce pipeline
☄️

Comet ML — Experiment Management

Automatic experiment logging, model comparison, custom panels.

Embed
🏠 Home ⚡ Code Lab 🧠 ML Studio 🔧 ML Tools