From 9ab2d23233aa489d76719bbf4d730d5ef4f6b469 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Mon, 1 Dec 2025 07:20:00 -0800 Subject: [PATCH] Update unsloth/models/rl.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- unsloth/models/rl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unsloth/models/rl.py b/unsloth/models/rl.py index be9732db34..0d795aa282 100644 --- a/unsloth/models/rl.py +++ b/unsloth/models/rl.py @@ -363,9 +363,9 @@ def _patch_trl_rl_trainers(trainer_file = "grpo_trainer"): RLConfig_name = config[0] try: RLTrainer = eval(f"trl.trainer.{trainer_file}.{RLTrainer_name}") - except: + except Exception as e: print( - f"Unsloth: Could not load {RLTrainer_name} from trl.trainer.{trainer_file}" + f"Unsloth: Could not load {RLTrainer_name} from trl.trainer.{trainer_file}: {e}" ) return try: