Proposal
Add optional SwanLab logging support to SAELens.
Motivation
Some users cannot reliably use Weights & Biases (wandb) due to network restrictions. SwanLab can serve as a drop-in alternative for experiment logging in these environments.
Pitch
- Add
wandb_compat.py, which selects swanlab or wandb based on SAE_LENS_LOGGING_BACKEND, and provides a fallback generate_id() implementation (use UUID when wandb.util.generate_id is unavailable).
- Keep calling
wandb.init() / wandb.finish() in llm_sae_training_runner.py, but route the actual backend module through the compatibility layer (either SwanLab or wandb).
- When the backend is SwanLab, skip Artifact-related
log_artifact calls in config.py (to avoid unsupported features), and stop using wandb.Histogram in sae_trainer.py.
Checklist
Proposal
Add optional SwanLab logging support to SAELens.
Motivation
Some users cannot reliably use Weights & Biases (wandb) due to network restrictions. SwanLab can serve as a drop-in alternative for experiment logging in these environments.
Pitch
wandb_compat.py, which selectsswanlaborwandbbased onSAE_LENS_LOGGING_BACKEND, and provides a fallbackgenerate_id()implementation (use UUID whenwandb.util.generate_idis unavailable).wandb.init()/wandb.finish()inllm_sae_training_runner.py, but route the actual backend module through the compatibility layer (either SwanLab or wandb).log_artifactcalls inconfig.py(to avoid unsupported features), and stop usingwandb.Histograminsae_trainer.py.Checklist