Setting up Neptune.ai for experiment tracking
Neptune.ai is a specialized platform for ML tracking with a focus on metadata management and convenient experiment comparison. It's a good choice for teams working with large experiment volumes.
Installation and configuration
pip install neptune
export NEPTUNE_API_TOKEN=xxx
export NEPTUNE_PROJECT=workspace/fraud-detection
Experiment logging
import neptune
run = neptune.init_run(
project="workspace/fraud-detection",
tags=["lgbm", "baseline"],
name="experiment-47"
)
# Параметры
run["config"] = {
"learning_rate": 0.05,
"n_estimators": 500,
"dataset_version": "v2.3"
}
# Метрики с историей
for epoch in range(100):
run["train/loss"].append(train_loss)
run["val/loss"].append(val_loss)
run["val/f1"].append(val_f1)
# Финальные метрики
run["test/f1"] = 0.924
run["test/auc"] = 0.971
# Артефакты
run["model"].upload("model.pkl")
run["feature_importance"].upload("fi.html")
# Датасет
dataset = neptune.init_model_version(model="FRAUD-MODEL")
dataset["dataset/train"].track_files("s3://bucket/data/train_v2.3/")
run.stop()
Neptune vs. MLflow vs. W&B
Neptune stands out: a Python dict-like interface for storing arbitrary metadata, good support for custom objects (dataframes, plotly figures), and detailed comparison tables. MLflow is simpler and better self-hosted. W&B has better visualization and sweeps. Neptune is the best for metadata-heavy workflows.







