(self, metadata)
Check if dataloader name and metric name even exist.
Check if dataloader name and metric name even exist.
Check if dataloader name and metric name even exist .
def on_train_begin(self, metadata):
        """Check if dataloader name and metric name even exist."""
        if self.dataloader_name not in self.run.val_dataloaders:
            raise ValueError('Did not find the dataloader {}'.format(self.dataloader_name))

        if self.metric_name not in self.run.metrics:
            raise ValueError('Did not find the metric {}'.format(self.metric_name))
def on_train_begin ( self , metadata ) : if self . dataloader_name not in self . run . val_dataloaders : raise ValueError ( 'Did not find the dataloader {}' . format ( self . dataloader_name ) ) if self . metric_name not in self . run . metrics : raise ValueError ( 'Did not find the metric {}' . format ( self . metric_name ) )