Skip to content

Commit

Permalink
Initialize checkpoint_manager in train.py.
Browse files Browse the repository at this point in the history
Resolves lint errors about checkpoint_manager not being initialized.

PiperOrigin-RevId: 565162627
  • Loading branch information
texasmichelle authored and t5-copybara committed Sep 13, 2023
1 parent ea66ec8 commit b7ff253
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions t5x/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ def _verify_matching_vocabs(cfg: utils.DatasetConfig):

# Skip initialization if neither save nor restore is requested.
train_state = None
checkpoint_manager = None
if valid_restore_cfg or checkpoint_period or checkpoint_steps:
train_state, checkpoint_manager = (
utils.create_checkpoint_manager_and_restore(
Expand Down

0 comments on commit b7ff253

Please sign in to comment.