Skip to content

How do I pass metric to tensorboards hparam interface #5101

@mm04926412

Description

@mm04926412

What is your question?

I have been unable to log metrics on the hparam menu in pytorch lightning. I've been googling for a few hours and found it difficult to get a straight explanation of how to do this. The only available metric is a generic one called hp_metric.

Code

def validation_epoch_end(self, outputs):
    avg_loss = torch.stack(outputs).mean()
    self.log("avg_val_loss", avg_loss)
    self.logger.log_metrics({"val_loss_metric": avg_loss})

What have you tried?

I have used self.save_hyperparameters in init and passed my config and added a self.logger.log_metrics function to my validation step. I've tried looking through the docs for tensorboard, torch and pytorch lightning and found myself unable to figure out what is needed here.

What's your environment?

  • OS: Linux
  • Packaging conda
  • Version1.0.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions