LeelaChessZero / lc0

The rewritten engine, originally for tensorflow. Now all other backends have been ported here.
GNU General Public License v3.0
2.46k stars 535 forks source link

Various issues w/ setoption #1843

Open uwuplant opened 1 year ago

uwuplant commented 1 year ago

BUG REPORT

Describe the bug The setoption command does not properly handle multiple name or value arguments.

Steps to Reproduce

  1. Send the command setoption value livelogstats value true Expected behavior: Throw an error that no name is given Observed behavior: lc0 returns error Flag '--preload' must be either 'true' or 'false' Additionally: setoption name a name b returns error Unknown option: ab.
borg323 commented 10 months ago

Note, the error for setoption name a name b should be error Unknown option: a name b i.e. everything after the first name until the first value should be treated as the option. Also doing setoption name MaxPrefetch value 1 value 2 is accepted and sets MaxPrefetch to 12, which is obviously bad. There are two reasonable alternatives here, either complain about a bad value 1 value 2 or about a wrong option MaxPrefetch value 1 depending on whether we use the first or last value token as the delimiter. I would prefer using the first value as delimiter to allow using the word value in string options, e.g. as part of a path name with spaces like setoption name LogFile value c:\best value for money\log.txt

KarlKfoury commented 2 months ago

Has this issue been fixed?

borg323 commented 2 months ago

No, the issue is still open.

KarlKfoury commented 2 months ago

i believe #2062 fixes the issue