def on_batch_end(self, batch_info):
if self.settings.stream_lr:<EOL><INDENT>iteration_idx = (<EOL>float(batch_info.epoch_number) +<EOL>float(batch_info.batch_number) / batch_info.batches_per_epoch<EOL>)<EOL>lr = batch_info.optimizer.param_groups[-<NUM_LIT:1>]['<STR_LIT>']<EOL>metrics_df = pd.DataFrame([lr], index=[iteration_idx], columns=['<STR_LIT>'])<EOL>visdom_append_metrics(<EOL>self.vis,<EOL>metrics_df,<EOL>first_epoch=(batch_info.epoch_number == <NUM_LIT:1>) and (batch_info.batch_number == <NUM_LIT:0>)<EOL>)<EOL><DEDENT>
Stream LR to visdom