I feel I’ve discussed this with someone somewhere (perhaps a gitissue…can’t find it!) but I can’t find it and now I came back and can’t figure out why my wandb command looks the way it does:
# - log to wandb
if log_to_wandb:
if it == 0:
wandb.define_metric("train loss", step_metric=it_or_epoch)
wandb.define_metric("train acc", step_metric=it_or_epoch)
wandb.define_metric("val loss", step_metric=it_or_epoch)
wandb.define_metric("val val", step_metric=it_or_epoch)
# if mdl_watch_log_freq == -1:
# wandb.watch(args.base_model, args.criterion, log="all", log_freq=mdl_watch_log_freq)
# - log to wandb
wandb.log(data={it_or_epoch: it, # custom step,
'train loss': train_loss,
'train acc': train_acc,
'val loss': val_loss,
'val acc': val_acc},
commit=True)
# if it == total_its: # not needed here, only needed for normal SL training
# wandb.finish()
can someone help me decipher what this was supposed to mean? Especially the commit option?
related: