We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c3cef9 commit b242f32Copy full SHA for b242f32
1 file changed
nemo_rl/algorithms/grpo.py
@@ -706,7 +706,11 @@ def grpo_train(
706
707
should_save_by_step = (is_last_step or (step + 1) % master_config["checkpointing"]["save_period"] == 0)
708
# +1 because step is 0-indexed
709
- should_save_by_timeout = timeout.check_save()
+ # Check if timeout-based checkpointing is enabled in config.
710
+ # If so, use TimeoutChecker to determine whether we should save due to timeout.Otherwise, default to False (no timeout-based saving).
711
+ if 'timeout' in master_config: should_save_by_timeout = timeout.check_save()
712
+ else: should_save_by_timeout = False
713
+
714
715
if master_config["checkpointing"]["enabled"] and (should_save_by_step or should_save_by_timeout):
716
policy.prepare_for_training()
0 commit comments