Update rl.py

This commit is contained in:
Daniel Han 2025-03-05 23:32:04 -08:00
commit f52f12a073

View file

@ -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