Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Unanswered
Hi All, I'M Using Pytorch-Lightning With The Tensoboard Logger: Here Is The Logging Code That Logs Images With The Tensoboard Logger.

Hi all,
I'm using Pytorch-Lightning with the Tensoboard logger:

Here is the logging code that logs images with the Tensoboard logger.

    def validation_step(self, batch, batch_idx):
        val_loss = self.__compute_loss(batch=batch, batch_idx=batch_idx)

        if batch_idx % 1 == 0:  # Log every 10 batches
            self.__log_tb_images(batch, batch_idx, val_loss)

        self.log("val_loss", val_loss)

    def __log_tb_images(self, batch, batch_idx, val_loss) -> None:
        imgs, y_true = batch
        y_pred = self(imgs)
        # Get tensorboard logger
        tb_logger = None
        for logger in self.trainer.loggers:
            if isinstance(logger, pl.loggers.TensorBoardLogger):
                tb_logger = logger.experiment
                break

        if tb_logger is None:
            raise ValueError('TensorBoard Logger not found')

        viz_batch = (imgs, y_true, y_pred, [batch_idx])
        # Log the images (Give them different names)
        for img_idx, (image, y_true, y_pred, batch_idx) in enumerate(zip(*viz_batch)):
            tb_logger.add_image(f"Image/{batch_idx}_{img_idx}", image, 0)
            tb_logger.add_image(
                f"GroundTruth/{batch_idx}_{img_idx}", y_true, 0)
            tb_logger.add_image(f"Prediction/{batch_idx}_{img_idx}", y_pred, 0)

According to: None logging to tensorboard get's automatically supported. But using the Tensorboard logger from pytorch lightning logging: None didn't work automatically for me. At least when I logged images those didn't show up in clearml. Would I need to write a custom pytorch lightning logger: None ; that call into the the manual logger from clearml: None ?

  
  
Posted one year ago
Votes Newest

Answers

725 Views
0 Answers
one year ago
one year ago
Tags