How to share wandb experiments
Quick answer
Use
wandb to log your experiments and share them by inviting collaborators to your project or by generating shareable reports and links. You can control access via team permissions or make reports public for easy sharing.PREREQUISITES
Python 3.8+wandb account (free tier available)pip install wandb
Setup
Install the wandb Python package and log in to your account to enable experiment tracking and sharing.
pip install wandb
wandb login Step by step
Log your experiment with wandb.init(), then share by inviting collaborators or creating reports.
import wandb
# Initialize a new run
run = wandb.init(project="my-project", entity="my-team")
# Log metrics
for epoch in range(3):
wandb.log({"epoch": epoch, "accuracy": 0.8 + epoch * 0.05})
# Finish the run
run.finish()
# After logging, go to your wandb project page to share:
# 1. Invite collaborators via project settings.
# 2. Create reports and share public links.
print("Experiment logged. Share your project via the wandb web interface.") output
Experiment logged. Share your project via the wandb web interface.
Common variations
You can share experiments by making reports public, exporting dashboards, or using the wandb.Api to programmatically access runs and share URLs.
import wandb
api = wandb.Api()
# Access a specific run by project and run ID
run = api.run("my-team/my-project/run-id")
# Get the URL to share
print("Shareable URL:", run.url)
# You can also create and share reports via the web UI for richer presentations. output
Shareable URL: https://wandb.ai/my-team/my-project/runs/run-id
Troubleshooting
- If collaborators cannot access your project, verify their team membership and project permissions in the wandb web interface.
- Ensure your project is not set to private if you want public sharing.
- Check your internet connection and wandb login status if runs fail to upload.
Key Takeaways
- Use
wandb.init()andwandb.log()to track experiments programmatically. - Share experiments by inviting collaborators or creating public reports via the wandb web UI.
- Control access with team permissions or make reports public for easy sharing.
- Use
wandb.Apito programmatically retrieve run URLs for sharing. - Troubleshoot access issues by checking project privacy and team membership settings.