KaTrain Questions
-
lightvector
- Lives in sente
- Posts: 759
- Joined: Sat Jun 19, 2010 10:11 pm
- Rank: maybe 2d
- GD Posts: 0
- Has thanked: 114 times
- Been thanked: 916 times
Re: KaTrain Questions
* You don't need to do anything to make KataGo use tensor cores, and there's not a great way to be absolutely sure whether it does or not, unless you use OpenCL. The OpenCL version will tell you if it's using tensor cores or not as it runs the tuning the first time you run it. Look at the tuning output as it tunes each operation reporting various performance stats and you'll see a section where it tunes (or fails to tune) for tensor cores and whether or not it decides to use them. The CUDA and TensorRT versions just call Nvidia's libraries and those libraries determine what to do by their own underlying magic, and you just have to trust whatever they are doing. Unlike the OpenCL, KataGo has little to no control over it. If CUDA or TensorRT version runs and works without crashing, then that's probably what you're going to get and that's it. So I recommend not worrying about whether it uses tensor cores or whatever or even trying to find that out because *you* also have little to no control over such low-level details, just benchmark each thing and see what finally gives the best visits/s (./katago.exe benchmark).
* KataGo has *always* historically had separate TensorRT and CUDA versions, and the same is true now, it's just that v1.13.0 had a bug with TensorRT (*NOT* a bug with tensor cores, tensor cores and TensorRT are completely different things with no particular relationship to each other), so it got its own release v1.13.1 with a fix, whereas all other versions (OpenCL, Eigen, CUDA) were not because they had no difference. Use TensorRT if you want to attempt Nvidia black magic, which goes beyond even the CUDA version by doing some secret Nvidia proprietary magic optimization of different layers of operations and such, which neither you or I have control over, which if it works, might squeeze out a bit more performance at the cost of much longer startup and loading times. Otherwise, just use whatever version works for you. CUDA is fine if you've installed CUDA. OpenCL is fine too, and has a decent chance of working right out of the box, it comes zipped with all the DLLs already that it should need.
* It's been a long time since I tried to install this stuff on Windows. I think that once you have the right drivers, "installation" consists of just having the right DLLs in your path, which are some some CUDA and CUDNN dlls for CUDA, or some DLL with "nvinfer" in the name for TensorRT ("nvinfer" is Nvidia's technical name for TensorRT that it uses for filenames or some technical docs). So, don't trust me on this too much since it's been a while, but I think for example that one could even crudely find the appropriate DLLs from digging into the installation folders and just copy them into the katago executable directory (since Windows also normally considers the local directory of an exe to be a search location for DLLs for that exe).
* KataGo has *always* historically had separate TensorRT and CUDA versions, and the same is true now, it's just that v1.13.0 had a bug with TensorRT (*NOT* a bug with tensor cores, tensor cores and TensorRT are completely different things with no particular relationship to each other), so it got its own release v1.13.1 with a fix, whereas all other versions (OpenCL, Eigen, CUDA) were not because they had no difference. Use TensorRT if you want to attempt Nvidia black magic, which goes beyond even the CUDA version by doing some secret Nvidia proprietary magic optimization of different layers of operations and such, which neither you or I have control over, which if it works, might squeeze out a bit more performance at the cost of much longer startup and loading times. Otherwise, just use whatever version works for you. CUDA is fine if you've installed CUDA. OpenCL is fine too, and has a decent chance of working right out of the box, it comes zipped with all the DLLs already that it should need.
* It's been a long time since I tried to install this stuff on Windows. I think that once you have the right drivers, "installation" consists of just having the right DLLs in your path, which are some some CUDA and CUDNN dlls for CUDA, or some DLL with "nvinfer" in the name for TensorRT ("nvinfer" is Nvidia's technical name for TensorRT that it uses for filenames or some technical docs). So, don't trust me on this too much since it's been a while, but I think for example that one could even crudely find the appropriate DLLs from digging into the installation folders and just copy them into the katago executable directory (since Windows also normally considers the local directory of an exe to be a search location for DLLs for that exe).
-
And
- Gosei
- Posts: 1464
- Joined: Tue Sep 25, 2018 10:28 am
- GD Posts: 0
- Has thanked: 212 times
- Been thanked: 215 times
Re: KaTrain Questions
in order to run katago-v1.13.1-trt8.5-cuda11.2-windows-x64, I downloaded Lizzieyzy and copied the nvinfer.dll, nvinfer_builder_resource.dll from there. I didn't install anything else. I checked in Sabaki with different networks.
it works about twice as fast as opencl for versions v1.12.4. for v1.13 I haven't compared yet
Lizzieyzy https://github.com/yzyray/lizzieyzy/releases
2023-01-30-windows64+katago.zip ~1.8gb
https://drive.google.com/file/d/1fhad97 ... drive_link
it works about twice as fast as opencl for versions v1.12.4. for v1.13 I haven't compared yet
Lizzieyzy https://github.com/yzyray/lizzieyzy/releases
2023-01-30-windows64+katago.zip ~1.8gb
https://drive.google.com/file/d/1fhad97 ... drive_link
-
RobertJasiek
- Judan
- Posts: 6273
- Joined: Tue Apr 27, 2010 8:54 pm
- GD Posts: 0
- Been thanked: 797 times
- Contact:
Re: KaTrain Questions
Thank you both! Now I have something to look for, try and benchmark. If I should install all the Nvidia stuff, I might then fetch the suitable DLLs and put them in KataGo's directory or see if setting PATH does the job.
-
RobertJasiek
- Judan
- Posts: 6273
- Joined: Tue Apr 27, 2010 8:54 pm
- GD Posts: 0
- Been thanked: 797 times
- Contact:
Re: KaTrain Questions
Suppose C:\katago is my directory to KataGo OpenCL, C:\baduk\katrain is my directory to KaTrain and C:\baduk is my directory of Baduk AI Megapack.
Now that I could run KataGo OpenCL, CUDA and TensorRT each in its directory as
katago benchmark
on the command line, I want to start with KataGo OpenCL in KaTrain in Windows. In C:\katago I run
katago.exe genconfig -model b18.bin.gz -output gtp_custom.cfg
and answer the questions as follows:
KataGo creates gtp_custom.cfg:
KataGo creates this LOG file:
The command line LOG is:
In KaTrain general settings, I set Override with my used model path and name:
C:\katago\katago.exe gtp -model 'C:\katago\b18.bin.gz' -config 'C:\katago\gtp_custom.cfg'
KataGo Engine Failed: exception: Could not open file 'C:\katago\gtp_custom.cfg' - does not exist or invalid permissions
KATAGO-INTERNAL-ERROR
The permissions are the same as in C:\baduk\katrain. The three files exist in C:\katago. Is the command syntax correct?
If yes, KaTrain might want all files in the same directory. Therefore, my next attempt has been to merge all supposedly necessary files into the same directory C:\baduk\test.
Now, in command line I run:
C:\baduk\test>katago gtp
Now, in command line I run:
C:\baduk\test>katago benchmark
So the KataGo OpenCL version in C:\baduk\test\katago.exe does run on the command line. However... now, in KaTrain I use
C:\baduk\test\katago.exe gtp
The following processes with their options are running:
Start KaTrain
ERROR: Unexpected exception Expecting value: line 1 column 1 (char 0) while processing KataGo output b'? unknown command'
Komi: 6.5
Rules: Japanese
I set Black Human - White AI then click a black move.
ERROR: <remains as before>
Analyzing move...
The dGPU has 0% load now. In KaTrain general settings Override, what is the correct command for running a KataGo file, net and CFG that are not already installed in the Baduk AI Megapack directory and its subdirectories?
Now that I could run KataGo OpenCL, CUDA and TensorRT each in its directory as
katago benchmark
on the command line, I want to start with KataGo OpenCL in KaTrain in Windows. In C:\katago I run
katago.exe genconfig -model b18.bin.gz -output gtp_custom.cfg
and answer the questions as follows:
C:\katago\katago.exe gtp -model 'C:\katago\b18.bin.gz' -config 'C:\katago\gtp_custom.cfg'
KataGo Engine Failed: exception: Could not open file 'C:\katago\gtp_custom.cfg' - does not exist or invalid permissions
KATAGO-INTERNAL-ERROR
The permissions are the same as in C:\baduk\katrain. The three files exist in C:\katago. Is the command syntax correct?
If yes, KaTrain might want all files in the same directory. Therefore, my next attempt has been to merge all supposedly necessary files into the same directory C:\baduk\test.
C:\baduk\test>katago gtp
C:\baduk\test>katago benchmark
C:\baduk\test\katago.exe gtp
The following processes with their options are running:
ERROR: Unexpected exception Expecting value: line 1 column 1 (char 0) while processing KataGo output b'? unknown command'
Komi: 6.5
Rules: Japanese
I set Black Human - White AI then click a black move.
ERROR: <remains as before>
Analyzing move...
The dGPU has 0% load now. In KaTrain general settings Override, what is the correct command for running a KataGo file, net and CFG that are not already installed in the Baduk AI Megapack directory and its subdirectories?
- Cassandra
- Lives in sente
- Posts: 1326
- Joined: Wed Apr 28, 2010 11:33 am
- Rank: German 1 Kyu
- GD Posts: 0
- Has thanked: 14 times
- Been thanked: 153 times
Re: KaTrain Questions
Why didn't you use ...RobertJasiek wrote:In KaTrain general settings, I set Override with my used model path and name:
C:\katago\katago.exe gtp -model 'C:\katago\b18.bin.gz' -config 'C:\katago\gtp_custom.cfg'
KataGo Engine Failed: exception: Could not open file 'C:\katago\gtp_custom.cfg' - does not exist or invalid permissions
KATAGO-INTERNAL-ERROR
The permissions are the same as in C:\baduk\katrain. The three files exist in C:\katago. Is the command syntax correct?
C:\katago\katago.exe gtp -model C:\katago\b18.bin.gz -config C:\katago\gtp_custom.cfg
???
The use of inverted commas is superfluous, as the directory / file name does NOT contain spaces.
If ever, you have to use the following syntax, as far as I know:
C:\katago\katago.exe gtp -model "C:\katago\b18.bin.gz" -config "C:\katago\gtp_custom.cfg"
The really most difficult Go problem ever: https://igohatsuyoron120.de/index.htm
Igo Hatsuyōron #120 (really solved by KataGo)
Igo Hatsuyōron #120 (really solved by KataGo)
-
RobertJasiek
- Judan
- Posts: 6273
- Joined: Tue Apr 27, 2010 8:54 pm
- GD Posts: 0
- Been thanked: 797 times
- Contact:
Re: KaTrain Questions
Thank you, I will try your syntax later today!
As to why: I could not find anything in KaTrain manuals yet but only some sample syntax in KataGo manuals with inverted commas. Therefore, I had to test various syntaxes and there are many possible combinations how syntaxes can look. Apparently, I must have missed to test the one you just suggest.
As to why: I could not find anything in KaTrain manuals yet but only some sample syntax in KataGo manuals with inverted commas. Therefore, I had to test various syntaxes and there are many possible combinations how syntaxes can look. Apparently, I must have missed to test the one you just suggest.
-
RobertJasiek
- Judan
- Posts: 6273
- Joined: Tue Apr 27, 2010 8:54 pm
- GD Posts: 0
- Been thanked: 797 times
- Contact:
Re: KaTrain Questions
I have made the following failing attempts to submit a working command to KaTrain. What is the correct syntax? What are my mistakes? What are KaTrain's or KataGo's bugs?
ATTEMPT 1
This directory has just Katago 1_13_0 OpenCL.
C:\katago\katago.exe gtp -model C:\katago\b18.bin.gz -config C:\katago\gtp_custom.cfg
Processes:
KaTrain: ERROR line 1 column 1 (char 0). When trying to play: GPU load 0%.
ATTEMPT 2
This is my test directory with Katago 1_13_0 OpenCL and all files merged.
C:\baduk\test\katago.exe gtp -model C:\baduk\test\b18.bin.gz -config C:\baduk\test\gtp_custom.cfg
Click on Update Settings: "KaTrain v.1.12.3 (Keine Rückmeldung)" meaning "KaTrain v.1.12.3 (no reply)" with the process KaTrain <0.01 CPU load
Restart KaTrain, General & Engine Settings, press ESC, then these processes are running:
KaTrain: ERROR line 1 column 1 (char 0). When trying to play: GPU load 0%.
ATTEMPT 3
From now on, I test KaTrain's Override for Baduk AI Megapack's lizzie directory, whose files work unless called by the Override command.
C:\baduk\lizzie\katago.exe gtp -model C:\baduk\lizzie\KataGo40b.gz
Processes:
KaTrain: ERROR line 1 column 1 (char 0). When trying to play: GPU load 0%.
ATTEMPT 4
C:\baduk\lizzie\katago.exe gtp -model C:\baduk\lizzie\KataGo40b.gz -config C:\baduk\lizzie\analysis_config.cfg
Click on Update Settings: "KaTrain v.1.12.3 (no reply)" with the process KaTrain <0.01 CPU load
Restart KaTrain: ERROR KataGo Engine Failed: exception: Could not find key 'logAllGTPCommunication' in config file C:\baduk\lizzie\analysis_config.cfg
KATAGO-INTERNAL-ERROR
Press ESC
ATTEMPT 5
C:\baduk\lizzie\katago.exe -model C:\baduk\lizzie\KataGo40b.gz -config C:\baduk\lizzie\analysis_config.cfg
Click on Update Settings, Restart KaTrain, ERROR line 1 column 1 (char 0).
Trying to play: The ERROR vanishes. Analyzing move... appears. GPU load 0%. Katago.exe is the only process.
ATTEMPT 6
If you wonder why I try (partial) Linux slashes from now on: KaTrain's settings write
Path to KataGo model file = C:/baduk/lizzie/KataGo40b.gz
C:\baduk\lizzie\katago.exe -model C:/baduk/lizzie/KataGo40b.gz -config C:\baduk\lizzie\analysis_config.cfg
Click on Update Settings, Start new game, ERROR vanishes, trying to play: Analyzing move... appears. GPU load 0%. Katago.exe is the only process.
ATTEMPT 7
C:\baduk\lizzie\katago.exe -model C:/baduk/lizzie/KataGo40b.gz -config C:/baduk/lizzie/analysis_config.cfg
Click on Update Settings, ERROR line 1 column 1 (char 0), Start new game, ERROR vanishes, Analyzing move... appears. GPU load 0%. Katago.exe is the only process.
ATTEMPT 8
C:/baduk/lizzie/katago.exe -model C:/baduk/lizzie/KataGo40b.gz -config C:/baduk/lizzie/analysis_config.cfg
Click on Update Settings, Start new game, ERROR vanishes, trying to play: Analyzing move... appears. GPU load 0%. Katago.exe is the only process.
ATTEMPT 1
This directory has just Katago 1_13_0 OpenCL.
C:\katago\katago.exe gtp -model C:\katago\b18.bin.gz -config C:\katago\gtp_custom.cfg
Processes:
ATTEMPT 2
This is my test directory with Katago 1_13_0 OpenCL and all files merged.
C:\baduk\test\katago.exe gtp -model C:\baduk\test\b18.bin.gz -config C:\baduk\test\gtp_custom.cfg
Click on Update Settings: "KaTrain v.1.12.3 (Keine Rückmeldung)" meaning "KaTrain v.1.12.3 (no reply)" with the process KaTrain <0.01 CPU load
Restart KaTrain, General & Engine Settings, press ESC, then these processes are running:
ATTEMPT 3
From now on, I test KaTrain's Override for Baduk AI Megapack's lizzie directory, whose files work unless called by the Override command.
C:\baduk\lizzie\katago.exe gtp -model C:\baduk\lizzie\KataGo40b.gz
Processes:
ATTEMPT 4
C:\baduk\lizzie\katago.exe gtp -model C:\baduk\lizzie\KataGo40b.gz -config C:\baduk\lizzie\analysis_config.cfg
Click on Update Settings: "KaTrain v.1.12.3 (no reply)" with the process KaTrain <0.01 CPU load
Restart KaTrain: ERROR KataGo Engine Failed: exception: Could not find key 'logAllGTPCommunication' in config file C:\baduk\lizzie\analysis_config.cfg
KATAGO-INTERNAL-ERROR
Press ESC
ATTEMPT 5
C:\baduk\lizzie\katago.exe -model C:\baduk\lizzie\KataGo40b.gz -config C:\baduk\lizzie\analysis_config.cfg
Click on Update Settings, Restart KaTrain, ERROR line 1 column 1 (char 0).
Trying to play: The ERROR vanishes. Analyzing move... appears. GPU load 0%. Katago.exe is the only process.
ATTEMPT 6
If you wonder why I try (partial) Linux slashes from now on: KaTrain's settings write
Path to KataGo model file = C:/baduk/lizzie/KataGo40b.gz
C:\baduk\lizzie\katago.exe -model C:/baduk/lizzie/KataGo40b.gz -config C:\baduk\lizzie\analysis_config.cfg
Click on Update Settings, Start new game, ERROR vanishes, trying to play: Analyzing move... appears. GPU load 0%. Katago.exe is the only process.
ATTEMPT 7
C:\baduk\lizzie\katago.exe -model C:/baduk/lizzie/KataGo40b.gz -config C:/baduk/lizzie/analysis_config.cfg
Click on Update Settings, ERROR line 1 column 1 (char 0), Start new game, ERROR vanishes, Analyzing move... appears. GPU load 0%. Katago.exe is the only process.
ATTEMPT 8
C:/baduk/lizzie/katago.exe -model C:/baduk/lizzie/KataGo40b.gz -config C:/baduk/lizzie/analysis_config.cfg
Click on Update Settings, Start new game, ERROR vanishes, trying to play: Analyzing move... appears. GPU load 0%. Katago.exe is the only process.
-
RobertJasiek
- Judan
- Posts: 6273
- Joined: Tue Apr 27, 2010 8:54 pm
- GD Posts: 0
- Been thanked: 797 times
- Contact:
Re: KaTrain Questions
KaTrain
I have made two more command line tests in KaTrain and both have failed.
KaTrain must be buggy!
Attempt 9
"C:\katago\katago.exe" gtp -model "C:\katago\b18.bin.gz" -config "C:\katago\gtp_custom.cfg"
Attempt 10
"C:\baduk\test\katago.exe gtp" -model "C:\baduk\test\b18.bin.gz" -config "C:\baduk\test\gtp_custom.cfg"
Lizzie
Next, I have tried Lizzie and got it to work within one minute with the following command line in the Lizzie Engine settings:
C:\katago\katago.exe gtp -model C:\katago\b18.bin.gz -config C:\katago\gtp_custom.cfg
Playing works. GPU load 96%. Processes:
I have made two more command line tests in KaTrain and both have failed.
KaTrain must be buggy!
Attempt 9
"C:\katago\katago.exe" gtp -model "C:\katago\b18.bin.gz" -config "C:\katago\gtp_custom.cfg"
Attempt 10
"C:\baduk\test\katago.exe gtp" -model "C:\baduk\test\b18.bin.gz" -config "C:\baduk\test\gtp_custom.cfg"
Lizzie
Next, I have tried Lizzie and got it to work within one minute with the following command line in the Lizzie Engine settings:
C:\katago\katago.exe gtp -model C:\katago\b18.bin.gz -config C:\katago\gtp_custom.cfg
Playing works. GPU load 96%. Processes:
-
thirdfogie
- Lives with ko
- Posts: 131
- Joined: Tue May 15, 2012 10:08 am
- Rank: British 3 kyu
- GD Posts: 0
- KGS: thirdfogie
- Has thanked: 151 times
- Been thanked: 30 times
Re: KaTrain Questions
Robert,
Thanks for your detailed posts on these topics. My small comment is that Lizzie
may also be buggy, at least on my system. If you have time, please run the following
test.
1. Load a game into Lizzie for analysis by KataGo.
2. Select a small number of visits, for example 50, by typing a50.
3. Let the analysis run to the end.
On my system, the resulting evaluation graph displays a downward red line marking
every move as a mistake by Black, but no upward red lines for White. I suspect
this is a bug in Lizzie not KataGo, but I don't know how to prove it.
As the number of visits increases, the discrepancy slowly disappears.
It is still noticeable with 1000 visits but not at 7000 visits per move.
I normally use 7000.
Thanks for your detailed posts on these topics. My small comment is that Lizzie
may also be buggy, at least on my system. If you have time, please run the following
test.
1. Load a game into Lizzie for analysis by KataGo.
2. Select a small number of visits, for example 50, by typing a50.
3. Let the analysis run to the end.
On my system, the resulting evaluation graph displays a downward red line marking
every move as a mistake by Black, but no upward red lines for White. I suspect
this is a bug in Lizzie not KataGo, but I don't know how to prove it.
As the number of visits increases, the discrepancy slowly disappears.
It is still noticeable with 1000 visits but not at 7000 visits per move.
I normally use 7000.
-
kvasir
- Lives in sente
- Posts: 1040
- Joined: Sat Jul 28, 2012 12:29 am
- Rank: panda 5 dan
- GD Posts: 0
- IGS: kvasir
- Has thanked: 25 times
- Been thanked: 187 times
Re: KaTrain Questions
It works for me. If I wait long enough the message "GTP ready, beginning main protocol loop" is printed and I can type GTP commands and the response is quick. I'm sure I can set the shell to echo what I type to make it more convenient.
However, you had this error message "ERROR: Unexpected exception Expecting value: line 1 column 1 (char 0) while processing KataGo output b'? unknown command'" which would indicate that you sent an unknown command. Maybe, at least in that one case you typed something that was not a command? There are other possibilities like for example character set mismatch but it seems less likely, but not impossible
You can at least test if it works by typing something like this on the command line. It is more reliable than waiting for the prompt and typing when it presents itself.
Which should eventually output as follows (not so long anymore, now that I have 13.1
).
If you get parsing errors then you need to make sure that your config file is correct (does it work with other commands) and that all paths are correct on the command line. If you get "command unknown" then KataGo and GTP are working but the command as transmitted was not found.
If you can use this "echo <gtp-command> | katago.exe gtp ..." pattern then I think that can tell you more about what is going on.
However, you had this error message "ERROR: Unexpected exception Expecting value: line 1 column 1 (char 0) while processing KataGo output b'? unknown command'" which would indicate that you sent an unknown command. Maybe, at least in that one case you typed something that was not a command? There are other possibilities like for example character set mismatch but it seems less likely, but not impossible
You can at least test if it works by typing something like this on the command line. It is more reliable than waiting for the prompt and typing when it presents itself.
Code: Select all
echo name | .\katago-v1.13.1-trt8.5-cuda11.2-windows-x64\katago.exe gtp -model .\models\b18c384nbt-optimisticv13-s5971M.bin.gz -config .\kataecho name | .\katago-v1.13.1-trt8.5-cuda11.2-windows-x64\katago.exe gtp -model .\models\b18c384nbt-optimisticv13-s5971M.bin.gz -config .\katago-v1.13.1-trt8.5-cuda11.2-windows-x64\analysis_config.cfgCode: Select all
KataGo v1.13.1
Using Japanese rules initially, unless GTP/GUI overrides this
Initializing board with boardXSize 19 boardYSize 19
Loaded config .\katago-v1.13.1-trt8.5-cuda11.2-windows-x64\analysis_config.cfg
Loaded model .\models\b18c384nbt-optimisticv13-s5971M.bin.gz
Model name: kata1-b18c384nbt-softplusfixv13-s5971481344-d3261785976
GTP ready, beginning main protocol loop
= KataGoIf you can use this "echo <gtp-command> | katago.exe gtp ..." pattern then I think that can tell you more about what is going on.
-
RobertJasiek
- Judan
- Posts: 6273
- Joined: Tue Apr 27, 2010 8:54 pm
- GD Posts: 0
- Been thanked: 797 times
- Contact:
Re: KaTrain Questions
kvasir, exactly what works for you? At exactly which procedural step do you have to wait long enough?
You seem to be using KataGo 1-13-1 TrensorRT while I have tried KataGo 1-13-0 OpenCl with KaTrain.
I may try the echo chamber if I understand its syntax correctly.
You seem to be using KataGo 1-13-1 TrensorRT while I have tried KataGo 1-13-0 OpenCl with KaTrain.
I may try the echo chamber if I understand its syntax correctly.
-
kvasir
- Lives in sente
- Posts: 1040
- Joined: Sat Jul 28, 2012 12:29 am
- Rank: panda 5 dan
- GD Posts: 0
- IGS: kvasir
- Has thanked: 25 times
- Been thanked: 187 times
Re: KaTrain Questions
Now, I am confused. I thought you had a problem using GTP with KataGo, that is what I was saying works and how you can test it. If you are having a problem using GTP with Katrain then that has a reason. Katrain doesn't use GTP.
KataGo and Katrain don't communicate using GTP.
You can configure the KataGo executable used by Katrain, including by giving a path to the executable file. You can also override the whole command used to start KataGo but this can easily fail if you don't know what Katrain wants and this is also not needed to change the executable used or the model file and config file. Since Katrain and KataGo don't communicate using GTP you wouldn't override the command with something like "katago.exe gtp ..." but with something else. I think something like: katago.exe analysis -model MMMM -config CCCC -analysis-threads XXXX -override-config "homeDataDir=DDDD" might be necessary since that is what Katrain uses if you don't try to override the command yourself. Basically, overriding the command is tricky and unnecessary.
Maybe I still didn't understand what the problem was. I hope it is useful information that GTP has nothing to do with Katrain.
KataGo and Katrain don't communicate using GTP.
You can configure the KataGo executable used by Katrain, including by giving a path to the executable file. You can also override the whole command used to start KataGo but this can easily fail if you don't know what Katrain wants and this is also not needed to change the executable used or the model file and config file. Since Katrain and KataGo don't communicate using GTP you wouldn't override the command with something like "katago.exe gtp ..." but with something else. I think something like: katago.exe analysis -model MMMM -config CCCC -analysis-threads XXXX -override-config "homeDataDir=DDDD" might be necessary since that is what Katrain uses if you don't try to override the command yourself. Basically, overriding the command is tricky and unnecessary.
Maybe I still didn't understand what the problem was. I hope it is useful information that GTP has nothing to do with Katrain.
-
RobertJasiek
- Judan
- Posts: 6273
- Joined: Tue Apr 27, 2010 8:54 pm
- GD Posts: 0
- Been thanked: 797 times
- Contact:
Re: KaTrain Questions
That KaTrain does not communicate via GTP with KataGo is new to me.
Does this mean for the Override command in KaTrain that it a) may never contain the GTP flag and b) may never contain -config referring to a gtp-version of a CFG file?
I will try to understand your additional remarks later. Meanwhile, let me report on the echo tests below. Maybe this gives you a better idea of the problem or what is not the problem so that your suggestions on what to write in the KaTrain Override command can become more specific and then easier for me to understand.
Below, I execute some commands in the Windows command line and state the outputs.
******************************************************
C:\echo is the KataGo OpenCL folder.
Does this mean for the Override command in KaTrain that it a) may never contain the GTP flag and b) may never contain -config referring to a gtp-version of a CFG file?
I will try to understand your additional remarks later. Meanwhile, let me report on the echo tests below. Maybe this gives you a better idea of the problem or what is not the problem so that your suggestions on what to write in the KaTrain Override command can become more specific and then easier for me to understand.
Below, I execute some commands in the Windows command line and state the outputs.
******************************************************
C:\echo is the KataGo OpenCL folder.
Code: Select all
C:\echo>echo name | katago.exe gtp -model b18.bin.gz -config .\kataecho name | katago.exe gtp -model b18.bin.gz -config gtp_custom.cfgCode: Select all
C:\echo>katago.exe gtp -helpCode: Select all
C:\echo>echo -h | katago.exe gtp -model b18.bin.gz -config .\kataecho -h | katago.exe gtp -model b18.bin.gz -config gtp_custom.cfgCode: Select all
C:\echo>echo -version | katago.exe gtp -model b18.bin.gz -config .\kataecho -version | katago.exe gtp -model b18.bin.gz -config gtp_custom.cfg-
kvasir
- Lives in sente
- Posts: 1040
- Joined: Sat Jul 28, 2012 12:29 am
- Rank: panda 5 dan
- GD Posts: 0
- IGS: kvasir
- Has thanked: 25 times
- Been thanked: 187 times
Re: KaTrain Questions
Sorry. I seem to have copied the command onto itself, probably right after I checked that it was correct. I always have trouble spotting mistakes in the edit window. I think it is that the small, old and unusual font is hard for me to read. Also the cursor in the edit window often vanishes.
It was supposed to be like shown next and it is only a way to make sure that he right GTP command is sent to the katago program.
a) If you override it then it has to use the "analysis" subcommand (not "gtp") and have the "-model" and "-config" flags but I don't know if "-analysis-threads" or the rest is necessary.
b) Katrain looks for some configurations in the CFG file and reports errors if they are not there, or did so in older versions. I think this is the only limitation on the CFG file but they have to be acceptable to KataGo of course.
It was supposed to be like shown next and it is only a way to make sure that he right GTP command is sent to the katago program.
Code: Select all
echo name | .\katago-v1.13.1-trt8.5-cuda11.2-windows-x64\katago.exe gtp -model .\models\b18c384nbt-optimisticv13-s5971M.bin.gz -config .\katago-v1.13.1-trt8.5-cuda11.2-windows-x64\analysis_config.cfgThe override should be something like this if used:RobertJasiek wrote:Does this mean for the Override command in KaTrain that it a) may never contain the GTP flag and b) may never contain -config referring to a gtp-version of a CFG file?
Code: Select all
katago.exe analysis -model MMMM -config CCCC -analysis-threads XXXX -override-config "homeDataDir=DDDD"a) If you override it then it has to use the "analysis" subcommand (not "gtp") and have the "-model" and "-config" flags but I don't know if "-analysis-threads" or the rest is necessary.
b) Katrain looks for some configurations in the CFG file and reports errors if they are not there, or did so in older versions. I think this is the only limitation on the CFG file but they have to be acceptable to KataGo of course.