From 956df63b9e8633e9104e1e2c786f221b97c1f952 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Fri, 14 Feb 2025 15:56:05 -0800 Subject: [PATCH] Update rl.py --- unsloth/models/rl.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/unsloth/models/rl.py b/unsloth/models/rl.py index eba1e46a21..2875ff64a5 100644 --- a/unsloth/models/rl.py +++ b/unsloth/models/rl.py @@ -171,9 +171,8 @@ def _patch_trl_rl_trainers(trainer_file = "grpo_trainer"): old_RLConfig_source = inspect.getsource(RLConfig) all_imports = dir(trainer) - # imports = [x for x in all_imports if not x.startswith("_")] - # Fix _deprecate_arguments not getting imported - imports = all_imports + # Fix _deprecate_arguments not getting imported so stop __ but not _ + imports = [x for x in all_imports if not x.startswith("__")] # Get default arguments EMPTY = inspect.Parameter.empty