Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Silence non-actionable TRL trainer import failures (#3980)

Daniel Han7ceebe455470
diff --git a/unsloth/models/rl.py b/unsloth/models/rl.py
old mode 100644
new mode 100755
index 3776752f4b4..eacfecc6c35
--- a/unsloth/models/rl.py
+++ b/unsloth/models/rl.py
@@ -420,7 +420,7 @@ def _patch_trl_rl_trainers(trainer_file = "grpo_trainer"):
try:
trainer = eval(f"trl.trainer.{trainer_file}")
except Exception as error:
- print(f"Unsloth: Could not import trl.trainer.{trainer_file}: {error}")
+ logger.info(f"Unsloth: Could not import trl.trainer.{trainer_file}: {error}")
return
# Get SFTTrainer and SFTConfig names