(self, metadata)
Initialize tqdm bar and metric lists.
Initialize tqdm bar and metric lists.
Initialize tqdm bar and metric lists .
def on_epoch_begin(self, metadata):
        """Initialize tqdm bar and metric lists."""
        self.bar = tqdm.tqdm(total=len(self.run.train_dataloader),
                             leave=True,
                             desc='Epoch {}'.format(metadata['epoch']),
                             file=self.output)
        self.metrics = {metric: [] for metric in self.run.metrics.keys()}
def on_epoch_begin ( self , metadata ) : self . bar = tqdm . tqdm ( total = len ( self . run . train_dataloader ) , leave = True , desc = 'Epoch {}' . format ( metadata [ 'epoch' ] ) , file = self . output ) self . metrics = { metric : [ ] for metric in self . run . metrics . keys ( ) }