pip install --upgrade wandb
wandb server start
(如果失败了)
docker pull wandb/local:latest
启动
docker run --rm -d -v wandb:/vol -p 8080:8080 --name wandb-local wandb/local:latest
打开http://localhost:8080/signup (有可能失败,就关了docker再开一次)
拿licence
https://deploy.wandb.ai/
有就复制,没有就创建
如果你的过期了license过期了,可以发邮件给contact@wandb.com
可以参考这个
然后在update lincense里复制进去
再点update
点update settings
此时就可以http://localhost:8080/home
登录
wandb login --relogin --host=http://localhost:8080
http://localhost:8080/authorize
这里找到key
跑个案例
import wandb
import random# start a new wandb run to track this script
wandb.init(# set the wandb project where this run will be loggedproject="my-awesome-project",# track hyperparameters and run metadataconfig={"learning_rate": 0.02,"architecture": "CNN","dataset": "CIFAR-100","epochs": 10,}
)# simulate training
epochs = 10
offset = random.random() / 5
for epoch in range(2, epochs):acc = 1 - 2 ** -epoch - random.random() / epoch - offsetloss = 2 ** -epoch + random.random() / epoch + offset# log metrics to wandbwandb.log({"acc": acc, "loss": loss})# [optional] finish the wandb run, necessary in notebooks
wandb.finish()
参考:
https://docs.wandb.ai/guides/hosting/self-managed/basic-setup