From 2debc447feddae3415e31dfc3e8a0a93c3084bc5 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Wed, 5 Mar 2025 23:19:12 -0800 Subject: [PATCH] Update rl.py --- unsloth/models/rl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unsloth/models/rl.py b/unsloth/models/rl.py index 25555e2628..71a568ef19 100644 --- a/unsloth/models/rl.py +++ b/unsloth/models/rl.py @@ -287,7 +287,7 @@ def _patch_trl_rl_trainers(trainer_file = "grpo_trainer"): # Force logits to be produced if preprocess_logits_for_metrics or compute_metrics is used if "model" in call_args: logits_check = \ - "_output_logits = False"\ + "_output_logits = False\n"\ "if locals().get('compute_metrics', None) is not None: _output_logits = True\n"\ "if locals().get('preprocess_logits_for_metrics', None) is not None: _output_logits = True\n"\ "if _output_logits:\n"\