minor logging changes if training from a checkpoint #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Line 53: If one were to train a model with a total of 100k epochs starting from a checkpoint of 25k epochs, the current code would display a status bar that runs from 0 to 100k. That would provide an inaccurate estimate of the remaining time, because there are actually only 75k epochs to run. This edit changes the status bar so it goes from
0toepochs - start_epoch, which in this example would be 0 to 75k.Line 56: When starting from a checkpoint other than 0, the checkpoint will almost always satisfy the two conditions
not epoch % epochs_til_checkpoint and epoch, so the current code would save a checkpoint before actually doing any training. Among other things, this overwrites the training losses file at the the starting checkpoint, replacing it with an empty file. Replacing the conditionepochwith the conditionepoch != start_epochshould fix that problem.