Skip to content

Commit e2bb647

Browse files
shun-linseanpmorgan
authored andcommitted
add get_config to tqdm (#681)
1 parent 4147791 commit e2bb647

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tensorflow_addons/callbacks/tqdm_progress_bar.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,3 +200,17 @@ def format_metrics(self, logs={}, factor=1):
200200
metric_value_pairs.append(pair)
201201
metrics_string = self.metrics_separator.join(metric_value_pairs)
202202
return metrics_string
203+
204+
def get_config(self):
205+
config = {
206+
'metrics_separator': self.metrics_separator,
207+
'overall_bar_format': self.overall_bar_format,
208+
'epoch_bar_format': self.epoch_bar_format,
209+
'leave_epoch_progress': self.leave_epoch_progress,
210+
'leave_overall_progress': self.leave_overall_progress,
211+
'show_epoch_progress': self.show_epoch_progress,
212+
'show_overall_progress': self.show_overall_progress,
213+
}
214+
215+
base_config = super(TQDMProgressBar, self).get_config()
216+
return dict(list(base_config.items()) + list(config.items()))

0 commit comments

Comments
 (0)