Weights & Biases (W&B) Experiment Tracking Setup

We design and deploy artificial intelligence systems: from prototype to production-ready solutions. Our team combines expertise in machine learning, data engineering and MLOps to make AI work not in the lab, but in real business.
Showing 1 of 1 servicesAll 1566 services
Weights & Biases (W&B) Experiment Tracking Setup
Simple
from 1 business day to 3 business days
FAQ
AI Development Areas
AI Solution Development Stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1243
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1170
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    873
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1086
  • image_logo-advance_0.png
    B2B Advance company logo design
    563
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    830

Setting up Weights & Biases for Experiment Tracking

W&B (Weights & Biases) is the most popular commercial experiment tracker. Its strengths include real-time training visualization, Sweeps (hyperparameter search), Artifacts (data and model versioning), and Reports (experiment documentation).

Basic setup

pip install wandb
wandb login  # или WANDB_API_KEY env variable
import wandb

# Инициализация run
run = wandb.init(
    project="fraud-detection",
    name="lgbm-experiment-42",
    config={
        "learning_rate": 0.05,
        "n_estimators": 500,
        "max_depth": 6,
        "dataset": "v2.3",
    },
    tags=["lgbm", "production-candidate"],
    notes="Testing new feature engineering"
)

# Логирование метрик
for epoch in range(config.epochs):
    train_loss, val_loss = train_step(epoch)
    wandb.log({"train/loss": train_loss, "val/loss": val_loss, "epoch": epoch})

# Логирование артефактов
artifact = wandb.Artifact("fraud-model", type="model")
artifact.add_file("model.pkl")
run.log_artifact(artifact)

wandb.finish()

W&B Sweeps for hyperparameter search

sweep_config = {
    "method": "bayes",  # bayes / random / grid
    "metric": {"name": "val/f1", "goal": "maximize"},
    "parameters": {
        "learning_rate": {"distribution": "log_uniform_values", "min": 1e-4, "max": 1e-1},
        "n_estimators": {"values": [100, 200, 500, 1000]},
        "max_depth": {"min": 3, "max": 10},
        "num_leaves": {"min": 20, "max": 100},
    }
}

sweep_id = wandb.sweep(sweep_config, project="fraud-detection")

def train_sweep():
    with wandb.init() as run:
        config = run.config
        model = LGBMClassifier(**config)
        model.fit(X_train, y_train)
        f1 = f1_score(y_test, model.predict(X_test))
        wandb.log({"val/f1": f1})

wandb.agent(sweep_id, function=train_sweep, count=50)

W&B Tables for data analysis

# Логирование примеров с предсказаниями
table = wandb.Table(columns=["text", "true_label", "predicted", "confidence", "is_correct"])
for text, true, pred, conf in test_samples[:100]:
    table.add_data(text, true, pred, conf, true == pred)
wandb.log({"predictions": table})

W&B stores all versions of tables, so you can compare predictions from different models on the same data.

Self-hosted W&B Server

# Для on-premise деплоя
docker run -d --name wandb-server \
  -p 8080:8080 \
  -v wandb-data:/vol \
  -e LICENSE=xxx \
  wandb/local:latest