Skip to content

TQDMProgressBar(leave_overall_progress=False) in consort with the EarlyStoppingCallback() dosn't leave progress bar #2774

@PhorstenkampFuzzy

Description

@PhorstenkampFuzzy

System information

  • Widnwos10:
  • TensorFlow version and how it was installed (source or binary): 2.9.1 binary
  • TensorFlow-Addons version and how it was installed (source or binary): 0.17.1
  • Python version: 3.10.3
  • Is GPU used? (yes/no): yes

Describe the bug
When using the TQDMProgressBar(leave_overall_progress=False) in consort with the EarlyStoppingCallback() the overall progress bar does not disappear. I assume this is not a feature but a bug.

Solution
If lines 5 to 7 from the following code snippet are inserted the behavior changes and the progressbar disappears after training.

       # line 143 of tensorflow_addons.callbacks.tqdm_progress_bar.py
        def _clean_up_progbar(self, hook, logs):
            if hook == "train_overall":
                if self.show_overall_progress:
                    self.overall_progress_tqdm.update(
                        self.num_epochs - self.overall_progress_tqdm.n
                    )
                    self.overall_progress_tqdm.close()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions