
Track Kaggle Experiments with W&B — Even Without Internet Access
The Problem Kaggle Notebooks disable internet access for competition submissions. This means you can't push metrics to Weights & Biases in real time — wandb.log() calls silently fail, and your experiment tracking is gone. I built a CLI tool to fix this. kaggle-wandb-sync pip install kaggle-wandb-sync PyPI : https://pypi.org/project/kaggle-wandb-sync/ GitHub : https://github.com/yasumorishima/kaggle-wandb-sync The idea: use WANDB_MODE=offline to log everything locally inside Kaggle, then download and sync after the run finishes. Notebook runs offline → download output → wandb sync → W&B cloud Notebook Setup Add two lines before importing wandb: import os os . environ [ ' WANDB_MODE ' ] = ' offline ' # must be before import wandb os . environ [ ' WANDB_PROJECT ' ] = ' my-project ' import wandb wandb . init ( name = " my-run " ) # ... your training code ... wandb . log ({ " loss " : 0.1 , " accuracy " : 0.95 }) wandb . finish () The offline run is saved to Kaggle's output directory automa
Continue reading on Dev.to Python
Opens in a new tab




