diff --git a/unsloth/models/rl.py b/unsloth/models/rl.py index 71a568ef19..cf9c16514e 100644 --- a/unsloth/models/rl.py +++ b/unsloth/models/rl.py @@ -291,7 +291,6 @@ def _patch_trl_rl_trainers(trainer_file = "grpo_trainer"): "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"\ - " import os\n"\ " os.environ['UNSLOTH_RETURN_LOGITS'] = '1'\n" extra_args += logits_check pass