Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for initial_epoch in keras TqdmCallback #1138

Closed
5 of 8 tasks
fabiocarrara opened this issue Mar 7, 2021 · 2 comments · Fixed by #1163
Closed
5 of 8 tasks

support for initial_epoch in keras TqdmCallback #1138

fabiocarrara opened this issue Mar 7, 2021 · 2 comments · Fixed by #1163
Assignees
Labels
c1-quick 🕐 Complexity low p3-enhancement 🔥 Much new such feature submodule ⊂ Periphery/subclasses to-merge ↰ Imminent
Milestone

Comments

@fabiocarrara
Copy link

  • I have marked all applicable categories:
    • exception-raising bug
    • visual output bug
    • documentation request (i.e. "X is missing from the documentation." If instead I want to ask "how to use X?" I understand StackOverflow#tqdm is more appropriate)
    • new feature request
  • I have visited the source website, and in particular read the known issues
  • I have searched through the issue tracker for duplicates
  • I have mentioned version numbers, operating system and evnironment, where applicable:

version 4.59.0, Google Colab

Would love the keras TqdmCallback to support initial_epochs in keras .fit() call to correctly initialize the starting point of the progress bar when resuming training.

Passing the initial epoch using initial kwarg does not seem to work, as it is not considered in on_train_begin().

tqdm/tqdm/keras.py

Lines 69 to 73 in bcce20f

def on_train_begin(self, *_, **__):
params = self.params.get
auto_total = params('epochs', params('nb_epoch', None))
if auto_total is not None:
self.epoch_bar.reset(total=auto_total)

Colab Gist reproducing the problem:
https://colab.research.google.com/gist/fabiocarrara/3f81bed4bc735291205b1b42fd5c1567/untitled1.ipynb

@casperdcl casperdcl self-assigned this Mar 8, 2021
@casperdcl casperdcl added this to the Non-breaking milestone Mar 8, 2021
@casperdcl casperdcl added c1-quick 🕐 Complexity low p3-enhancement 🔥 Much new such feature submodule ⊂ Periphery/subclasses to-merge ↰ Imminent labels Mar 8, 2021
@javoweb
Copy link
Contributor

javoweb commented Mar 17, 2021

Hi @casperdcl, are you working on this? I want to contribute to this fix.

@casperdcl
Copy link
Sponsor Member

Oh sure go ahead; I wasn't going to look at this for another couple of weeks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c1-quick 🕐 Complexity low p3-enhancement 🔥 Much new such feature submodule ⊂ Periphery/subclasses to-merge ↰ Imminent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants