Skip to content

Commit

Permalink
correct semantic error in import_vars (ggerganov#355)
Browse files Browse the repository at this point in the history
* Hide unavailable backends & Add tooltip over backend count

Hides unavailable backends from the user and if the program is launched without any backends made, it shows an error message to them stating no backends were found and to make them using the 'make' command

Add tooltip when hovering over backend count label

hovering over the new label that shows the backend count will explain what the numbers are, and show the users which backends are not available or built

* add some code comments

* hide "missing" if all are built

move tooltip functions to helper functions section. hides the string "Missing: ..." from showing if all backends are available
" if len(runopts)==6 else + "

* small typo fix

* remove wrongly added leftover device choosing code

* fix labels

* move tooltip to function

* import vars logic fix

---------

Co-authored-by: Concedo <39025047+LostRuins@users.noreply.github.com>
  • Loading branch information
YellowRoseCx and LostRuins authored Jul 31, 2023
1 parent 5ea5d19 commit f279727
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions koboldcpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1137,10 +1137,7 @@ def import_vars(dict):
if str(g) in dict["usecublas"]:
gpu_choice_var.set(str(g+1))
break
if "gpulayers" in dict and dict["gpulayers"]:
gpulayers_var.set(dict["gpulayers"])

if "noavx2" in dict and "noblas" in dict and dict["noblas"] and dict["noavx2"]:
elif "noavx2" in dict and "noblas" in dict and dict["noblas"] and dict["noavx2"]:
if failsafe_option is not None:
runopts_var.set(failsafe_option)
elif "noavx2" in dict and dict["noavx2"]:
Expand All @@ -1151,6 +1148,8 @@ def import_vars(dict):
runopts_var.set(default_option)
elif openblas_option is not None:
runopts_var.set(openblas_option)
if "gpulayers" in dict and dict["gpulayers"]:
gpulayers_var.set(dict["gpulayers"])
if "blasthreads" in dict and dict["blasthreads"]:
blas_threads_var.set(str(dict["blasthreads"]))
else:
Expand Down

0 comments on commit f279727

Please sign in to comment.