Update rl.py

This commit is contained in:
Daniel Han 2025-02-06 01:07:00 -08:00
commit fb486eafc8

View file

@ -377,6 +377,7 @@ def _patch_trl_rl_trainers(trainer_file = "grpo_trainer"):
# Patch all functions
for function in changed:
exec(changed[function], imported_functions, globals())
print(changed[function])
exec(f"trl.trainer.{trainer_file}.{RLTrainer_name}.{function} = _unsloth_{function}", imported_functions, globals())
pass
pass