How is one suppose to do custom logging in wandb especially with the x-axis?

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:
                #, 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},
            # 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?


Hi Brando,
It looks like it is logging steps to our UI. To know more about commit = True, look at this doc


Hi there, I wanted to follow up on this request. Please let us know if we can be of further assistance or if your issue has been resolved.

Hi Brando, since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.