google-research / t5x

Apache License 2.0
2.58k stars 296 forks source link

[train.py] UnboundLocalError: local variable 'checkpoint_manager' referenced before assignment #1546

Closed gpupuck closed 1 month ago

gpupuck commented 2 months ago

https://github.com/google-research/t5x/blob/6b02d25cd67a397c6cfffe90ad2cca4b343535ae/t5x/train.py#L800

File "/opt/t5x/t5x/train.py", line 800, in train
  checkpoint_manager.close()
UnboundLocalError: local variable 'checkpoint_manager' referenced before assignment
gpupuck commented 2 months ago

@liangyaning33 Could you please take a quick look? It appears that the indentation is not the only issue on this checkpoint_manager.close() line.

liangyaning33 commented 1 month ago

Hi @gpupuck ,

Sorry about the breakage. The fix was just submitted as: https://github.com/google-research/t5x/commit/717cb3c6a45ec20e2ae9bd029994f607e1d38ed3 Please let me know if you still face an issue on this. Thanks!!