Skip to content

Commit

Permalink
1.13 (#626)
Browse files Browse the repository at this point in the history
* NGF fix
* Password warning
* Bump requests from 2.25.0 to 2.31.0 (#623)
* Update katago
* update workflows
* edit README.md
  • Loading branch information
sanderland committed May 28, 2023
1 parent b7fe4b0 commit 7ba12a0
Show file tree
Hide file tree
Showing 30 changed files with 68 additions and 26 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/osxbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ on:

jobs:
osx_app:
runs-on: macos-11
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Build KataGo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
python-version: ['3.7', '3.11'] # '3.8', '3.9',

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,14 @@ KaTrain is a tool for analyzing games and playing go with AI feedback from KataG

## <a name="kata"></a> Configuring KataGo

KaTrain comes pre-packaged with a working KataGo (OpenCL version) for Windows, Linux, and pre-M1 Mac operating systems, and the 15 block model.
KaTrain comes pre-packaged with a working KataGo (OpenCL version) for Windows, Linux, and pre-M1 Mac operating systems, and the rather old 15 block model.

To change the model, open 'General and Engine settings' in the application and 'Download models'. You can then select the model you want from the dropdown menu.

To change the katago binary, e.g. to the Eigen/CPU version if you don't have a GPU, click 'Download KataGo versions'.
You can then select the KataGo binary from the dropdown menu.
There are also CUDA and TensorRT versions available on [the KataGo release site](https://github.com/lightvector/KataGo/releases). Particularly the latter may offer much better performance on NVIDIA GPUs, but will be harder to
set up: [see here for more details](https://github.com/lightvector/KataGo#opencl-vs-cuda-vs-tensorrt-vs-eigen).

Finally, you can override the entire command used to start the analysis engine, which
can be useful for connecting to a remote server. Do keep in mind that KaTrain uses the *analysis engine*
Expand Down
Binary file modified katrain/KataGo/katago
Binary file not shown.
Binary file modified katrain/KataGo/katago.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion katrain/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"anim_pv_time": 0.5,
"debug_level": 0,
"lang": "en",
"version": "1.12.1",
"version": "1.13.0",
"load_fast_analysis": false,
"load_sgf_rewind": true
},
Expand Down
2 changes: 1 addition & 1 deletion katrain/core/constants.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PROGRAM_NAME = "KaTrain"
VERSION = "1.12.3"
VERSION = "1.13.0"
HOMEPAGE = "https://github.com/sanderland/katrain"
CONFIG_MIN_VERSION = "1.11.0" # keep config files from this version
ANALYSIS_FORMAT_VERSION = "1.0"
Expand Down
5 changes: 4 additions & 1 deletion katrain/core/sgf_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,10 @@ def parse_ngf(cls, ngf):

key = line[4]
raw_move = line[5:7].lower()
value = chr(ord(raw_move[0]) - 1) + chr(ord(raw_move[1]) - 1)
if raw_move == "aa":
value = "" # pass
else:
value = chr(ord(raw_move[0]) - 1) + chr(ord(raw_move[1]) - 1)

node = cls._NODE_CLASS(parent=node)
node.set_property(key, value)
Expand Down
25 changes: 12 additions & 13 deletions katrain/gui/popups.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,8 @@ class BaseConfigPopup(QuickConfigGui):
"20 block model": "https://github.com/lightvector/KataGo/releases/download/v1.4.5/g170e-b20c256x2-s5303129600-d1228401921.bin.gz",
"30 block model": "https://github.com/lightvector/KataGo/releases/download/v1.4.5/g170-b30c320x2-s4824661760-d1229536699.bin.gz",
"40 block model": "https://github.com/lightvector/KataGo/releases/download/v1.4.5/g170-b40c256x2-s5095420928-d1229425124.bin.gz",
"18 'nested residual block' model": "https://github.com/lightvector/KataGo/releases/download/v1.12.0/b18c384nbt-uec.bin.gz",
"18 'nested residual block' model": "https://github.com/lightvector/KataGo/releases/download/v1.12.2/b18c384nbt-uec.bin.gz",
"18 block 'optimistic policy' model": "https://github.com/lightvector/KataGo/releases/download/v1.13.0/b18c384nbt-optimisticv13-s5971M.bin.gz",
}
MODEL_DESC = {
"Fat 40 block model": "https://d3dndmfyhecmj0.cloudfront.net/g170/neuralnets/g170e-b40c384x2-s2348692992-d1229892979.zip",
Expand All @@ -480,22 +481,20 @@ class BaseConfigPopup(QuickConfigGui):

KATAGOS = {
"win": {
"OpenCL v1.12.3": "https://github.com/lightvector/KataGo/releases/download/v1.12.3/katago-v1.12.3-opencl-windows-x64.zip",
"Eigen AVX2 (Modern CPUs) v1.12.3": "https://github.com/lightvector/KataGo/releases/download/v1.12.3/katago-v1.12.3-eigenavx2-windows-x64.zip",
"Eigen (CPU, Non-optimized) v1.12.3": "https://github.com/lightvector/KataGo/releases/download/v1.12.3/katago-v1.12.3-eigen-windows-x64.zip",
"OpenCL v1.12.3 (bigger boards)": "https://github.com/lightvector/KataGo/releases/download/v1.12.3/katago-v1.12.3-opencl-windows-x64+bs29.zip",
"OpenCL v1.13.0": "https://github.com/lightvector/KataGo/releases/download/v1.13.0/katago-v1.13.0-opencl-windows-x64.zip",
"Eigen AVX2 (Modern CPUs) v1.13.0": "https://github.com/lightvector/KataGo/releases/download/v1.13.0/katago-v1.13.0-eigenavx2-windows-x64.zip",
"Eigen (CPU, Non-optimized) v1.13.0": "https://github.com/lightvector/KataGo/releases/download/v1.13.0/katago-v1.13.0-eigen-windows-x64.zip",
"OpenCL v1.13.0 (bigger boards)": "https://github.com/lightvector/KataGo/releases/download/v1.13.0/katago-v1.13.0-opencl-windows-x64+bs29.zip",
},
"linux": {
"OpenCL v1.12.3": "https://github.com/lightvector/KataGo/releases/download/v1.12.3/katago-v1.12.3-opencl-linux-x64.zip",
"Eigen AVX2 (Modern CPUs) v1.12.3": "https://github.com/lightvector/KataGo/releases/download/v1.12.3/katago-v1.12.3-eigenavx2-linux-x64.zip",
"Eigen (CPU, Non-optimized) v1.12.3": "https://github.com/lightvector/KataGo/releases/download/v1.12.3/katago-v1.12.3-eigen-linux-x64.zip",
"OpenCL v1.12.3 (bigger boards)": "https://github.com/lightvector/KataGo/releases/download/v1.12.3/katago-v1.12.3-opencl-linux-x64+bs29.zip",
"OpenCL v1.13.0": "https://github.com/lightvector/KataGo/releases/download/v1.13.0/katago-v1.13.0-opencl-linux-x64.zip",
"Eigen AVX2 (Modern CPUs) v1.13.0": "https://github.com/lightvector/KataGo/releases/download/v1.13.0/katago-v1.13.0-eigenavx2-linux-x64.zip",
"Eigen (CPU, Non-optimized) v1.13.0": "https://github.com/lightvector/KataGo/releases/download/v1.13.0/katago-v1.13.0-eigen-linux-x64.zip",
"OpenCL v1.13.0 (bigger boards)": "https://github.com/lightvector/KataGo/releases/download/v1.13.0/katago-v1.13.0-opencl-linux-x64+bs29.zip",
},
"just-descriptions": {
"CUDA v1.12.3 (Windows)": "https://github.com/lightvector/KataGo/releases/download/v1.12.3/katago-v1.12.3-cuda11.2-windows-x64.zip",
"CUDA v1.12.3 (Linux)": "https://github.com/lightvector/KataGo/releases/download/v1.12.3/katago-v1.12.3-cuda11.1-linux-x64.zip",
"Cuda/TensorRT v1.12.3 (Windows)": "https://github.com/lightvector/KataGo/releases/download/v1.12.3/katago-v1.12.1-trt8.2-cuda11.2-windows-x64.zip",
"Cuda/TensorRT v1.12.3 (Linux)": "https://github.com/lightvector/KataGo/releases/download/v1.12.3/katago-v1.12.1-trt8.2-cuda11.1-linux-x64.zip",
"CUDA v1.13.0 (Windows)": "https://github.com/lightvector/KataGo/releases/download/v1.13.0/katago-v1.13.0-cuda11.2-windows-x64.zip",
"CUDA v1.13.0 (Linux)": "https://github.com/lightvector/KataGo/releases/download/v1.13.0/katago-v1.13.0-cuda11.1-linux-x64.zip",
},
}

Expand Down
Binary file modified katrain/i18n/locales/cn/LC_MESSAGES/katrain.mo
Binary file not shown.
4 changes: 4 additions & 0 deletions katrain/i18n/locales/cn/LC_MESSAGES/katrain.po
Original file line number Diff line number Diff line change
Expand Up @@ -962,3 +962,7 @@ msgstr "to move"
#. TODO - Restrict analysis to move range
msgid "limit to moves"
msgstr "Limit to moves"

#. TODO
msgid "contribute:passwordwarning"
msgstr "(Stored as plain text, do not re-use this anywhere)"
Binary file modified katrain/i18n/locales/de/LC_MESSAGES/katrain.mo
Binary file not shown.
10 changes: 7 additions & 3 deletions katrain/i18n/locales/de/LC_MESSAGES/katrain.po
Original file line number Diff line number Diff line change
Expand Up @@ -744,18 +744,18 @@ msgstr "Cache-Analyse in SGF"
msgid "menu:save-as"
msgstr "Spiel speichern als..."

#. Laden
# sgf load button
#. Laden
msgid "Load File"
msgstr "Spiel laden"

#. Save SGF (Popup)
# sgf save popup
#. Save SGF (Popup)
msgid "save sgf title"
msgstr "SGF-Datei speichern"

#. Save button
# sgf save button
#. Save button
msgid "Save File"
msgstr "Datei speichern"

Expand Down Expand Up @@ -1031,3 +1031,7 @@ msgstr "to move"
#. TODO - Restrict analysis to move range
msgid "limit to moves"
msgstr "Limit to moves"

#. TODO
msgid "contribute:passwordwarning"
msgstr "(Stored as plain text, do not re-use this anywhere)"
Binary file modified katrain/i18n/locales/en/LC_MESSAGES/katrain.mo
Binary file not shown.
3 changes: 3 additions & 0 deletions katrain/i18n/locales/en/LC_MESSAGES/katrain.po
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,9 @@ msgstr "Username"
msgid "contribute:password"
msgstr "Password"

msgid "contribute:passwordwarning"
msgstr "(Stored as plain text, do not re-use this anywhere)"

msgid "contribute:register"
msgstr "Register"

Expand Down
Binary file modified katrain/i18n/locales/fr/LC_MESSAGES/katrain.mo
Binary file not shown.
4 changes: 4 additions & 0 deletions katrain/i18n/locales/fr/LC_MESSAGES/katrain.po
Original file line number Diff line number Diff line change
Expand Up @@ -1000,3 +1000,7 @@ msgid "move range analysis"
msgstr ""
"Analyse de partie approfondie du coup {start_move} au coup {end_move} "
"({visits} visites/coup)."

#. TODO
msgid "contribute:passwordwarning"
msgstr "(Stored as plain text, do not re-use this anywhere)"
Binary file modified katrain/i18n/locales/jp/LC_MESSAGES/katrain.mo
Binary file not shown.
4 changes: 4 additions & 0 deletions katrain/i18n/locales/jp/LC_MESSAGES/katrain.po
Original file line number Diff line number Diff line change
Expand Up @@ -1003,3 +1003,7 @@ msgstr "to move"
#. TODO - Restrict analysis to move range
msgid "limit to moves"
msgstr "Limit to moves"

#. TODO
msgid "contribute:passwordwarning"
msgstr "(Stored as plain text, do not re-use this anywhere)"
Binary file modified katrain/i18n/locales/ko/LC_MESSAGES/katrain.mo
Binary file not shown.
4 changes: 4 additions & 0 deletions katrain/i18n/locales/ko/LC_MESSAGES/katrain.po
Original file line number Diff line number Diff line change
Expand Up @@ -936,3 +936,7 @@ msgstr "to move"
#. TODO - Restrict analysis to move range
msgid "limit to moves"
msgstr "Limit to moves"

#. TODO
msgid "contribute:passwordwarning"
msgstr "(Stored as plain text, do not re-use this anywhere)"
Binary file modified katrain/i18n/locales/ru/LC_MESSAGES/katrain.mo
Binary file not shown.
4 changes: 4 additions & 0 deletions katrain/i18n/locales/ru/LC_MESSAGES/katrain.po
Original file line number Diff line number Diff line change
Expand Up @@ -966,3 +966,7 @@ msgstr "Только для ходов"
#. status message
msgid "move range analysis"
msgstr "Анализ ходов от {start_move} до {end_move} с {visits} посещениями"

#. TODO
msgid "contribute:passwordwarning"
msgstr "(Stored as plain text, do not re-use this anywhere)"
Binary file modified katrain/i18n/locales/tr/LC_MESSAGES/katrain.mo
Binary file not shown.
4 changes: 4 additions & 0 deletions katrain/i18n/locales/tr/LC_MESSAGES/katrain.po
Original file line number Diff line number Diff line change
Expand Up @@ -1066,3 +1066,7 @@ msgstr "to move"
#. TODO - Restrict analysis to move range
msgid "limit to moves"
msgstr "Limit to moves"

#. TODO
msgid "contribute:passwordwarning"
msgstr "(Stored as plain text, do not re-use this anywhere)"
Binary file modified katrain/i18n/locales/tw/LC_MESSAGES/katrain.mo
Binary file not shown.
4 changes: 4 additions & 0 deletions katrain/i18n/locales/tw/LC_MESSAGES/katrain.po
Original file line number Diff line number Diff line change
Expand Up @@ -985,3 +985,7 @@ msgstr "to move"
#. TODO - Restrict analysis to move range
msgid "limit to moves"
msgstr "Limit to moves"

#. TODO
msgid "contribute:passwordwarning"
msgstr "(Stored as plain text, do not re-use this anywhere)"
3 changes: 3 additions & 0 deletions katrain/popups.kv
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,9 @@
icon: "eye"
pos_hint: {"center_x": 0, "center_y": .5}
on_press: password.password = not password.password
SmallDescriptionLabel:
padding_x: dp(40)
text: i18n._("contribute:passwordwarning")
DescriptionLabel:
text: ''
id: error
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ Kivy-Garden==0.1.4
kivymd==0.104.1
Pillow==9.3.0
Pygments==2.7.4
requests==2.25.0
requests==2.31.0
urllib3==1.26.5
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def include_data_files(directory):
"chardet", # for automatic encoding detection
],
dependency_links=["https://kivy.org/downloads/simple/"],
python_requires=">=3.7, <3.11",
python_requires=">=3.7, <4.0",
entry_points={"console_scripts": ["katrain=katrain.__main__:run_app"]},
classifiers=[
"Development Status :: 5 - Production/Stable",
Expand Down

0 comments on commit 7ba12a0

Please sign in to comment.