From c8c8dafc04945a111393998e9c154f4f703a98ea Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 12 Mar 2026 10:16:52 +0000 Subject: [PATCH] Fix older-TRL GRPO resume branch wiring --- unsloth/models/rl.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/unsloth/models/rl.py b/unsloth/models/rl.py index c288bf7060..5b835129f7 100755 --- a/unsloth/models/rl.py +++ b/unsloth/models/rl.py @@ -1840,8 +1840,6 @@ def patch_functions(RLTrainer, trainer_file, RLTrainer_name, all_imports, import new_vllm_part, flags = re.DOTALL, # Ensure . matches newlines [[5]] ) - - init = init.replace(vllm_part, new_vllm_part) else: new_vllm_part = ( f"\n{' '*8}if {args}.use_vllm:\n" @@ -1851,7 +1849,7 @@ def patch_functions(RLTrainer, trainer_file, RLTrainer_name, all_imports, import f"{' '*12}self.accelerator.wait_for_everyone()\n" f"\n{' '*8}else:\n" ) - init = init.replace(vllm_part, new_vllm_part) + init = init.replace(vllm_part, new_vllm_part) # Search for vLLM calling in all child functions functions = dir(RLTrainer)