diff --git a/vime/backends/megatron_utils/model.py b/vime/backends/megatron_utils/model.py index 684ae2b4d..9ff9e5151 100644 --- a/vime/backends/megatron_utils/model.py +++ b/vime/backends/megatron_utils/model.py @@ -769,6 +769,9 @@ def train( log_dict["train/step"] = accumulated_step_id logging_utils.log(args, log_dict, step_key="train/step") + if args.ci_test and "train/train_rollout_logprob_abs_diff" in log_dict: + assert log_dict["train/train_rollout_logprob_abs_diff"] <= 0.1, f"{log_dict=}" + if args.ci_test and not args.ci_disable_kl_checker: if step_id == 0 and "train/ppo_kl" in log_dict and "train/pg_clipfrac" in log_dict: # TODO: figure out why KL is not exactly zero when using PPO loss with KL clipping, and whether this is expected behavior or a bug.