linting (+1 squashed commits)

Squashed commits:

[994427d3c] linting
This commit is contained in:
LostRuins Concedo 2025-11-10 18:13:15 +08:00
parent 2ae6bff5bd
commit cdc18f0945

View file

@ -1361,7 +1361,6 @@ def fetch_gpu_properties(testCL,testCU,testVK,testmemory=False):
gpumem_ignore_limit_max = 1024*1024*1024*300 #300 gb max
if testCU:
cumem, freecumem = detect_memory_cu(gpumem_ignore_limit_min, gpumem_ignore_limit_max)
MaxMemory[0] = max(cumem,MaxMemory[0])
MaxFreeMemory[0] = max(freecumem,MaxFreeMemory[0])
@ -1369,14 +1368,12 @@ def fetch_gpu_properties(testCL,testCU,testVK,testmemory=False):
print(f'detected CUDA memory: {cumem/(1024*1024)} MB, {freecumem/(1024*102)} MB free')
if testVK:
vkmem = detect_memory_vk(gpumem_ignore_limit_min, gpumem_ignore_limit_max)
MaxMemory[0] = max(vkmem,MaxMemory[0])
if testmemory:
print(f'detected Vulkan memory: {vkmem/(1024*1024)} MB')
if testCL:
clmem = detect_memory_cl(gpumem_ignore_limit_min, gpumem_ignore_limit_max)
MaxMemory[0] = max(clmem,MaxMemory[0])
if testmemory:
@ -2380,7 +2377,7 @@ def format_jinja(messages,tools):
text = jinja_compiled_template.render(messages=messages, tools=tools, add_generation_prompt=True, bos_token="", eos_token="")
return text if text else None
except Exception as e:
print("Jinja formatting failed: {e}")
print(f"Jinja formatting failed: {e}")
return None
def remove_outer_tags(inputstr):