[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
781450e450
commit
d28ff5d5a1
2 changed files with 2 additions and 3 deletions
|
|
@ -32,7 +32,7 @@ from .rl_replacements import (
|
|||
RL_PRE_ITEMS,
|
||||
RL_CONFIG_CHANGES,
|
||||
RL_METRICS_CHANGES,
|
||||
RL_ADDITIONAL_FUNCTIONS
|
||||
RL_ADDITIONAL_FUNCTIONS,
|
||||
)
|
||||
|
||||
torch_compile_options = {
|
||||
|
|
@ -1329,7 +1329,6 @@ def patch_trl_rl_trainers():
|
|||
|
||||
|
||||
def patch_trl_openenv():
|
||||
|
||||
for function in RL_ADDITIONAL_FUNCTIONS["openenv"]:
|
||||
print(f"Unsloth: Patching trl openenv with function: {function.__name__}")
|
||||
function() # Call the function to apply the patch
|
||||
|
|
|
|||
|
|
@ -957,7 +957,7 @@ def openenv_vllm_reload_weights():
|
|||
|
||||
# Change wake_up(tags=["kv_cache"]) to wake_up() - wake everything to set is_sleeping=False
|
||||
# This prevents double wake_up issues. Unsloth's allocator skips weights anyway.
|
||||
src = re.sub(r'\.wake_up\(tags=\[.*?\]\)', '.wake_up()', src)
|
||||
src = re.sub(r"\.wake_up\(tags=\[.*?\]\)", ".wake_up()", src)
|
||||
|
||||
if original_src == src:
|
||||
print("Unsloth: Warning - regex did not match, patch may have failed")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue