hmm
This commit is contained in:
1 parent
f035627b1d
commit
58f91072eb
3 files changed
+14
-10
No files matched your search
@@ -211,7 +211,7 @@ class KeyValueSpinner(Spinner):
|
||||
value_refs = ListProperty()
|
||||
selected_index = NumericProperty(0)
|
||||
font_name = StringProperty(DEFAULT_FONT)
|
||||
|
||||
no_update = BooleanProperty(False)
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
self.build_values()
|
||||
@@ -230,9 +230,10 @@ class KeyValueSpinner(Spinner):
|
||||
new_index = self.values.index(text)
|
||||
if new_index != self.selected_index:
|
||||
self.selected_index = new_index
|
||||
self.dispatch("on_select")
|
||||
return self.dispatch("on_select")
|
||||
except (ValueError, IndexError):
|
||||
pass
|
||||
return not self.no_update
|
||||
|
||||
def on_select(self, *args):
|
||||
pass
|
||||
|
||||
@@ -453,9 +453,9 @@ class ConfigPopup(QuickConfigGui):
|
||||
self.katago_files.text = katas_available_msg
|
||||
|
||||
MODELS = {
|
||||
"latest 20b": "https://github.com/lightvector/KataGo/releases/download/v1.4.5/g170e-b20c256x2-s5303129600-d1228401921.bin.gz",
|
||||
"latest 30b": "https://github.com/lightvector/KataGo/releases/download/v1.4.5/g170-b30c320x2-s4824661760-d1229536699.bin.gz",
|
||||
"latest 40b": "https://github.com/lightvector/KataGo/releases/download/v1.4.5/g170-b40c256x2-s5095420928-d1229425124.bin.gz",
|
||||
"Latest 20 block model": "https://github.com/lightvector/KataGo/releases/download/v1.4.5/g170e-b20c256x2-s5303129600-d1228401921.bin.gz",
|
||||
"Latest 30 block model": "https://github.com/lightvector/KataGo/releases/download/v1.4.5/g170-b30c320x2-s4824661760-d1229536699.bin.gz",
|
||||
"Latest 40 block model": "https://github.com/lightvector/KataGo/releases/download/v1.4.5/g170-b40c256x2-s5095420928-d1229425124.bin.gz",
|
||||
}
|
||||
|
||||
KATAGOS = {
|
||||
@@ -472,8 +472,8 @@ class ConfigPopup(QuickConfigGui):
|
||||
"OpenCL v1.6.1 (bigger boards)": "https://github.com/lightvector/KataGo/releases/download/v1.6.1%2Bbs29/katago-v1.6.1+bs29-gpu-opencl-linux-x64.zip",
|
||||
},
|
||||
"just-descriptions": {
|
||||
"CUDA v1.6.1 (New NVIDIA cards)": "https://github.com/lightvector/KataGo/releases/download/v1.6.1/katago-v1.6.1-gpu-cuda10.2-windows-x64.zip",
|
||||
"CUDA v1.6.1 (New NVIDIA cards)": "https://github.com/lightvector/KataGo/releases/download/v1.6.1/katago-v1.6.1-gpu-cuda10.2-linux-x64.zip",
|
||||
"CUDA v1.6.1 (Windows)": "https://github.com/lightvector/KataGo/releases/download/v1.6.1/katago-v1.6.1-gpu-cuda10.2-windows-x64.zip",
|
||||
"CUDA v1.6.1 (Linux)": "https://github.com/lightvector/KataGo/releases/download/v1.6.1/katago-v1.6.1-gpu-cuda10.2-linux-x64.zip",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
+6
-3
@@ -112,8 +112,9 @@
|
||||
KeyValueSpinner:
|
||||
id: katago_files
|
||||
text: ''
|
||||
no_update: True
|
||||
on_select:
|
||||
if self.selected_index != 0: katago_path.text = self.values[self.selected_index]
|
||||
if self.selected_index != 0: katago_path.text = self.value_keys[self.selected_index]
|
||||
size_hint_y: 0.7
|
||||
sync_height_frac: 1.0
|
||||
-font_size: self.height * 0.5
|
||||
@@ -139,10 +140,12 @@
|
||||
on_press: root.download_models()
|
||||
size_hint_y: 0.7
|
||||
AnchorLayout:
|
||||
Spinner:
|
||||
KeyValueSpinner:
|
||||
id: model_files
|
||||
text: ''
|
||||
on_text: if self.text and self.text != self.values[0]: model_path.text = args[1]
|
||||
no_update: True
|
||||
on_select:
|
||||
if self.selected_index != 0: katago_path.text = self.value_keys[self.selected_index]
|
||||
size_hint_y: 0.7
|
||||
sync_height_frac: 1.0
|
||||
-font_size: self.height * 0.5
|
||||
|
||||
Reference in new issue
Block a user