Throw a helpful ValueError when global_step couldn't be populated.
Throw a helpful ValueError when global_step couldn't be populated.

Instead of barfing deep in the stack, proactively throw a ValueError indicating the issue.

PiperOrigin-RevId: 293944237

google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research