Skip to content

Commit cdc18f0

Browse files
committed
linting (+1 squashed commits)
Squashed commits: [994427d] linting
1 parent 2ae6bff commit cdc18f0

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

koboldcpp.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,22 +1361,19 @@ def fetch_gpu_properties(testCL,testCU,testVK,testmemory=False):
13611361
gpumem_ignore_limit_max = 1024*1024*1024*300 #300 gb max
13621362

13631363
if testCU:
1364-
13651364
cumem, freecumem = detect_memory_cu(gpumem_ignore_limit_min, gpumem_ignore_limit_max)
13661365
MaxMemory[0] = max(cumem,MaxMemory[0])
13671366
MaxFreeMemory[0] = max(freecumem,MaxFreeMemory[0])
13681367
if testmemory:
13691368
print(f'detected CUDA memory: {cumem/(1024*1024)} MB, {freecumem/(1024*102)} MB free')
13701369

13711370
if testVK:
1372-
13731371
vkmem = detect_memory_vk(gpumem_ignore_limit_min, gpumem_ignore_limit_max)
13741372
MaxMemory[0] = max(vkmem,MaxMemory[0])
13751373
if testmemory:
13761374
print(f'detected Vulkan memory: {vkmem/(1024*1024)} MB')
13771375

13781376
if testCL:
1379-
13801377
clmem = detect_memory_cl(gpumem_ignore_limit_min, gpumem_ignore_limit_max)
13811378
MaxMemory[0] = max(clmem,MaxMemory[0])
13821379
if testmemory:
@@ -2380,7 +2377,7 @@ def tojson(x, ensure_ascii=False, indent=None, separators=None, sort_keys=False)
23802377
text = jinja_compiled_template.render(messages=messages, tools=tools, add_generation_prompt=True, bos_token="", eos_token="")
23812378
return text if text else None
23822379
except Exception as e:
2383-
print("Jinja formatting failed: {e}")
2380+
print(f"Jinja formatting failed: {e}")
23842381
return None
23852382

23862383
def remove_outer_tags(inputstr):

0 commit comments

Comments
 (0)