SabakiHQ / Sabaki

An elegant Go board and SGF editor for a more civilized age.
https://sabaki.yichuanshen.de/
MIT License
2.42k stars 377 forks source link

Sabaki complains about a missing `gtp_logs` folder when configuring KataGo #959

Open sagehane opened 5 months ago

sagehane commented 5 months ago

I tried getting KataGo working on the Linux AppImage of Sabaki (v0.52.2).

Relevant section of settings.json:

  "engines.list": [
    {
      "name": "KataGo",
      "path": "/etc/profiles/per-user/plumeus/bin/katago",
      "args": "gtp -config /home/plumeus/Downloads/gtp.cfg -model /home/plumeus/Downloads/kata1-b28c512nbt-s7168446720-d4316919285.bin.gz"
    }
  ],

Expected behaviour:

KataGo should work just like on the commandline

$ katago gtp -model /home/plumeus/Downloads/kata1-b28c512nbt-s7168446720-d4316
919285.bin.gz -config /home/plumeus/Downloads/gtp.cfg 
KataGo v1.14.1
Using NewZealand rules initially, unless GTP/GUI overrides this
Creating context for OpenCL Platform: AMD Accelerated Parallel Processing (Advanced Micro Devices, Inc.) (OpenCL 2.1 AMD-APP (3602.0))
Using OpenCL Device 0: gfx1010:xnack- (Advanced Micro Devices, Inc.) OpenCL 2.0  (Extensions: cl_khr_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_gl_sharing cl_amd_device_attribute_query cl_amd_media_ops cl_amd_media_ops2 cl_khr_image2d_from_buffer cl_khr_subgroups cl_khr_depth_images cl_amd_copy_buffer_p2p cl_amd_assembly_program )
Loaded tuning parameters from: /home/plumeus/.katago/opencltuning/tune11_gpugfx1010xnack_x19_y19_c512_mv15.txt
Initializing board with boardXSize 19 boardYSize 19
Loaded config /home/plumeus/Downloads/gtp.cfg
Loaded model /home/plumeus/Downloads/kata1-b28c512nbt-s7168446720-d4316919285.bin.gz
Model name: kata1-b28c512nbt-s7168446720-d4316919285
GTP ready, beginning main protocol loop
name
= KataGo

version
= 1.14.1

Actual behaviour

Sabaki complains about some missing folder in the logs.

[2024-07-02 16:57:45.365] <KataGo>  (meta) : Engine Started
[2024-07-02 16:57:45.405] <KataGo>   (err) : terminate called after throwing an instance of 'StringError'
[2024-07-02 16:57:45.406] <KataGo>   (err) :   what():  Error creating directory: gtp_logs
[2024-07-02 16:57:45.503] <KataGo>  (meta) : Engine Stopped
sagehane commented 5 months ago

Hmm, uncommenting the line in my gtp.cfg file that corresponds to https://github.com/lightvector/KataGo/blob/v1.14.1/cpp/configs/gtp_example.cfg#L47 seems to solve it.