Skip to content

Commit

Permalink
Convert unknown override from error to warning
Browse files Browse the repository at this point in the history
  • Loading branch information
lightvector committed Jun 30, 2021
1 parent 5effec6 commit 473e15a
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 14 deletions.
5 changes: 2 additions & 3 deletions cpp/command/analysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -828,11 +828,10 @@ int MainCmds::analysis(int argc, const char* const* argv) {
localCfg.overrideKeys(overrideSettings);
loadParams(localCfg, rbase.params, rbase.perspective, defaultPerspective);
SearchParams::failIfParamsDifferOnUnchangeableParameter(defaultParams,rbase.params);
//Hard failure on unused override keys newly present in the config
//Soft failure on unused override keys newly present in the config
vector<string> unusedKeys = localCfg.unusedKeys();
if(unusedKeys.size() > 0) {
reportErrorForId(rbase.id, "overrideSettings", string("Unknown config params: ") + Global::concat(unusedKeys,","));
continue;
reportWarningForId(rbase.id, "overrideSettings", string("Unknown config params: ") + Global::concat(unusedKeys,","));
}
}
catch(const StringError& exception) {
Expand Down
54 changes: 49 additions & 5 deletions cpp/tests/results/analysis/badoverride.txt.log
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,54 @@
: Analyzing up to 1 positions at at time in parallel
: Started, ready to begin handling requests
: Request: {"id":"badoverride","initialStones":[],"moves":[],"rules":"tromp-taylor","komi":7.5,"boardXSize":19,"boardYSize":19,"overrideSettings":{"sldjfslkjf":1234}}
: Response: {"error":"Unknown config params: sldjfslkjf","field":"overrideSettings","id":"badoverride"}
: Response: {"field":"overrideSettings","id":"badoverride","warning":"Unknown config params: sldjfslkjf"}
: MoveNum: 0 HASH: CDCBC1F514D7E680FACD226074256633
A B C D E F G H J K L M N O P Q R S T
19 . . . . . . . . . . . . . . . . . . .
18 . . . . . . . . . . . . . . . . . . .
17 . . . . . . . . . . . . . . . . . . .
16 . . . . . . . . . . . . . . . . . . .
15 . . . . . . . . . . . . . . . . . . .
14 . . . . . . . . . . . . . . . . . . .
13 . . . . . . . . . . . . . . . . . . .
12 . . . . . . . . . . . . . . . . . . .
11 . . . . . . . . . . . . . . . . . . .
10 . . . . . . . . . . . . . . . . . . .
9 . . . . . . . . . . . . . . . . . . .
8 . . . . . . . . . . . . . . . . . . .
7 . . . . . . . . . . . . . . . . . . .
6 . . . . . . . . . . . . . . . . . . .
5 . . . . . . . . . . . . . . . . . . .
4 . . . . . . . . . . . . . . . . . . .
3 . . . . . . . . . . . . . . . . . . .
2 . . . . . . . . . . . . . . . . . . .
1 . . . . . . . . . . . . . . . . . . .

koPOSITIONALscoreAREAtaxNONEsui1komi7.5
Root visits: 100
New playouts: 100
NN rows: 93
NN batches: 93
NN avg batch size: 1
PV: Q17 Q3 C16 D3
Tree:
: T 0.30c W -0.48c S 0.25c ( +0.0 L +0.1) N 100 -- Q17 Q3 C16 D3
---Black(^)---
Q17 : T 1.94c W 0.75c S 0.42c ( +0.3 L +0.2) LCB -3.01c P 8.73% WF 13.2 PSV 18 N 13 -- Q17 Q3 C16 D3
D3 : T 1.33c W 0.48c S 0.43c ( +0.3 L +0.4) LCB -7.08c P 8.43% WF 10.1 PSV 10 N 10 -- D3 R16 C16 Q3
Q3 : T 0.67c W 0.01c S 0.37c ( +0.2 L +0.3) LCB -5.32c P 8.99% WF 11.0 PSV 8 N 11 -- Q3 R16 D3 D17
C16 : T 0.93c W -0.16c S 0.35c ( +0.2 L +0.3) LCB -7.86c P 8.21% WF 10.0 PSV 8 N 10 -- C16 Q3 C4 Q17
R4 : T 0.01c W -0.51c S 0.19c ( -0.0 L +0.1) LCB -10.21c P 8.90% WF 8.0 PSV 7 N 8 -- R4 R16 D3 D17
D17 : T -0.11c W -0.99c S 0.19c ( -0.0 L +0.0) LCB -13.55c P 8.00% WF 9.0 PSV 6 N 9 -- D17 D3 Q3 Q17
C4 : T -0.14c W -0.79c S 0.20c ( -0.0 L +0.0) LCB -22.06c P 8.60% WF 7.0 PSV 6 N 7 -- C4 R16 C16 Q3
R16 : T 0.21c W -0.55c S 0.29c ( +0.1 L +0.1) LCB -15.82c P 7.34% WF 7.0 PSV 6 N 7 -- R16 Q3 C4 D17
D4 : T -0.24c W -1.14c S 0.15c ( -0.1 L -0.0) LCB -21.58c P 4.67% WF 6.0 PSV 3 N 6 -- D4 R16 C16 Q3
Q4 : T -0.77c W -1.40c S 0.08c ( -0.2 L -0.1) LCB -28.18c P 5.83% WF 5.0 PSV 3 N 5 -- Q4 D3 D17

: Response: {"id":"badoverride","isDuringSearch":false,"moveInfos":[{"lcb":0.486046529,"move":"Q17","order":0,"prior":0.0873468071,"pv":["Q17","Q3","C16","D3"],"scoreLead":0.244669937,"scoreMean":0.244669937,"scoreSelfplay":0.283823611,"scoreStdev":30.5964027,"utility":0.0194314039,"utilityLcb":-0.0301491608,"visits":13,"winrate":0.503753873},{"lcb":0.472369076,"move":"D3","order":1,"prior":0.0843354836,"pv":["D3","R16","C16","Q3"],"scoreLead":0.356980532,"scoreMean":0.356980532,"scoreSelfplay":0.301336074,"scoreStdev":30.5359323,"utility":0.013312322,"utilityLcb":-0.0708087692,"visits":10,"winrate":0.502412323},{"lcb":0.478652514,"move":"Q3","order":2,"prior":0.0898618773,"pv":["Q3","R16","D3","D17"],"scoreLead":0.336632775,"scoreMean":0.336632775,"scoreSelfplay":0.219574824,"scoreStdev":30.4981717,"utility":0.00674066202,"utilityLcb":-0.0531871153,"visits":11,"winrate":0.500055291},{"lcb":0.467816644,"move":"C16","order":3,"prior":0.0821331814,"pv":["C16","Q3","C4","Q17"],"scoreLead":0.294962021,"scoreMean":0.294962021,"scoreSelfplay":0.183244657,"scoreStdev":30.4559867,"utility":0.00934610281,"utilityLcb":-0.0785536678,"visits":10,"winrate":0.499209419},{"lcb":0.460991056,"move":"R4","order":4,"prior":0.0889515132,"pv":["R4","R16","D3","D17"],"scoreLead":0.0682060713,"scoreMean":0.0682060713,"scoreSelfplay":-0.0438997565,"scoreStdev":30.580555,"utility":7.52266046e-05,"utilityLcb":-0.102053298,"visits":8,"winrate":0.497465529},{"lcb":0.447020369,"move":"D17","order":5,"prior":0.0799890161,"pv":["D17","D3","Q3","Q17"],"scoreLead":0.0218095677,"scoreMean":0.0218095677,"scoreSelfplay":-0.0447340323,"scoreStdev":30.5938338,"utility":-0.00108575889,"utilityLcb":-0.135518539,"visits":9,"winrate":0.495032076},{"lcb":0.417765676,"move":"C4","order":6,"prior":0.0860429108,"pv":["C4","R16","C16","Q3"],"scoreLead":0.0484061819,"scoreMean":0.0484061819,"scoreSelfplay":-0.0293904706,"scoreStdev":30.5187975,"utility":-0.00144332319,"utilityLcb":-0.220572512,"visits":7,"winrate":0.496026101},{"lcb":0.440007432,"move":"R16","order":7,"prior":0.0734403655,"pv":["R16","Q3","C4","D17"],"scoreLead":0.149068045,"scoreMean":0.149068045,"scoreSelfplay":0.098167625,"scoreStdev":30.5734559,"utility":0.00206229455,"utilityLcb":-0.158212292,"visits":7,"winrate":0.497248355},{"lcb":0.418102158,"move":"D4","order":8,"prior":0.0467210412,"pv":["D4","R16","C16","Q3"],"scoreLead":-0.00153968099,"scoreMean":-0.00153968099,"scoreSelfplay":-0.110048172,"scoreStdev":30.6087797,"utility":-0.00244866255,"utilityLcb":-0.215772476,"visits":6,"winrate":0.494289234},{"lcb":0.39513641,"move":"Q4","order":9,"prior":0.0582804717,"pv":["Q4","D3","D17"],"scoreLead":-0.0874934366,"scoreMean":-0.0874934366,"scoreSelfplay":-0.203119232,"scoreStdev":30.6637984,"utility":-0.00772052575,"utilityLcb":-0.281774406,"visits":5,"winrate":0.493012795},{"lcb":-0.539759232,"move":"D16","order":10,"prior":0.0466103293,"pv":["D16","D3","Q17"],"scoreLead":-0.423128655,"scoreMean":-0.423128655,"scoreSelfplay":-0.375178605,"scoreStdev":30.8506984,"utility":-0.00203272855,"utilityLcb":-2.89931947,"visits":3,"winrate":0.494986032},{"lcb":0.204316732,"move":"Q16","order":11,"prior":0.0390345268,"pv":["Q16","D3","D17"],"scoreLead":-0.118248108,"scoreMean":-0.118248108,"scoreSelfplay":-0.203899162,"scoreStdev":30.6889087,"utility":-0.00802204011,"utilityLcb":-0.814399047,"visits":4,"winrate":0.49230852},{"lcb":-0.509233154,"move":"C3","order":12,"prior":0.032418035,"pv":["C3","R16"],"scoreLead":-0.50300651,"scoreMean":-0.50300651,"scoreSelfplay":-0.481208861,"scoreStdev":30.7182236,"utility":-0.0195234983,"utilityLcb":-2.8,"visits":2,"winrate":0.490766846},{"lcb":-0.512627609,"move":"C17","order":13,"prior":0.0303994529,"pv":["C17","R16"],"scoreLead":-0.696764469,"scoreMean":-0.696764469,"scoreSelfplay":-0.665824383,"scoreStdev":30.7521139,"utility":-0.0275804033,"utilityLcb":-2.8,"visits":2,"winrate":0.487372391},{"lcb":-0.50508099,"move":"R3","order":14,"prior":0.019928446,"pv":["R3","R16"],"scoreLead":-0.308993541,"scoreMean":-0.308993541,"scoreSelfplay":-0.199929476,"scoreStdev":30.7235794,"utility":-0.00930872972,"utilityLcb":-2.8,"visits":2,"winrate":0.49491901}],"rootInfo":{"currentPlayer":"B","scoreLead":0.130163481,"scoreSelfplay":0.068932742,"scoreStdev":30.5844813,"symHash":"47E1EBDAE69A5DED3FF8DB1FA4E91845","thisHash":"47E1EBDAE69A5DED3FF8DB1FA4E91845","utility":0.00439348547,"visits":100,"winrate":0.498180364},"turnNumber":0}
: tests/models/g170-b6c96-s175395328-d26788732.bin.gz
: NN rows: 0
: NN batches: 0
: NN avg batch size: -nan
: GPU -1 finishing, processed 0 rows 0 batches
: NN rows: 93
: NN batches: 93
: NN avg batch size: 1
: GPU -1 finishing, processed 93 rows 93 batches
: All cleaned up, quitting
54 changes: 49 additions & 5 deletions cpp/tests/results/analysis/badoverride.txt.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,54 @@
: Analyzing up to 1 positions at at time in parallel
: Started, ready to begin handling requests
: Request: {"id":"badoverride","initialStones":[],"moves":[],"rules":"tromp-taylor","komi":7.5,"boardXSize":19,"boardYSize":19,"overrideSettings":{"sldjfslkjf":1234}}
: Response: {"error":"Unknown config params: sldjfslkjf","field":"overrideSettings","id":"badoverride"}
: Response: {"field":"overrideSettings","id":"badoverride","warning":"Unknown config params: sldjfslkjf"}
: MoveNum: 0 HASH: CDCBC1F514D7E680FACD226074256633
A B C D E F G H J K L M N O P Q R S T
19 . . . . . . . . . . . . . . . . . . .
18 . . . . . . . . . . . . . . . . . . .
17 . . . . . . . . . . . . . . . . . . .
16 . . . . . . . . . . . . . . . . . . .
15 . . . . . . . . . . . . . . . . . . .
14 . . . . . . . . . . . . . . . . . . .
13 . . . . . . . . . . . . . . . . . . .
12 . . . . . . . . . . . . . . . . . . .
11 . . . . . . . . . . . . . . . . . . .
10 . . . . . . . . . . . . . . . . . . .
9 . . . . . . . . . . . . . . . . . . .
8 . . . . . . . . . . . . . . . . . . .
7 . . . . . . . . . . . . . . . . . . .
6 . . . . . . . . . . . . . . . . . . .
5 . . . . . . . . . . . . . . . . . . .
4 . . . . . . . . . . . . . . . . . . .
3 . . . . . . . . . . . . . . . . . . .
2 . . . . . . . . . . . . . . . . . . .
1 . . . . . . . . . . . . . . . . . . .

koPOSITIONALscoreAREAtaxNONEsui1komi7.5
Root visits: 100
New playouts: 100
NN rows: 93
NN batches: 93
NN avg batch size: 1
PV: Q17 Q3 C16 D3
Tree:
: T 0.30c W -0.48c S 0.25c ( +0.0 L +0.1) N 100 -- Q17 Q3 C16 D3
---Black(^)---
Q17 : T 1.94c W 0.75c S 0.42c ( +0.3 L +0.2) LCB -3.01c P 8.73% WF 13.2 PSV 18 N 13 -- Q17 Q3 C16 D3
D3 : T 1.33c W 0.48c S 0.43c ( +0.3 L +0.4) LCB -7.08c P 8.43% WF 10.1 PSV 10 N 10 -- D3 R16 C16 Q3
Q3 : T 0.67c W 0.01c S 0.37c ( +0.2 L +0.3) LCB -5.32c P 8.99% WF 11.0 PSV 8 N 11 -- Q3 R16 D3 D17
C16 : T 0.93c W -0.16c S 0.35c ( +0.2 L +0.3) LCB -7.86c P 8.21% WF 10.0 PSV 8 N 10 -- C16 Q3 C4 Q17
R4 : T 0.01c W -0.51c S 0.19c ( -0.0 L +0.1) LCB -10.21c P 8.90% WF 8.0 PSV 7 N 8 -- R4 R16 D3 D17
D17 : T -0.11c W -0.99c S 0.19c ( -0.0 L +0.0) LCB -13.55c P 8.00% WF 9.0 PSV 6 N 9 -- D17 D3 Q3 Q17
C4 : T -0.14c W -0.79c S 0.20c ( -0.0 L +0.0) LCB -22.06c P 8.60% WF 7.0 PSV 6 N 7 -- C4 R16 C16 Q3
R16 : T 0.21c W -0.55c S 0.29c ( +0.1 L +0.1) LCB -15.82c P 7.34% WF 7.0 PSV 6 N 7 -- R16 Q3 C4 D17
D4 : T -0.24c W -1.14c S 0.15c ( -0.1 L -0.0) LCB -21.58c P 4.67% WF 6.0 PSV 3 N 6 -- D4 R16 C16 Q3
Q4 : T -0.77c W -1.40c S 0.08c ( -0.2 L -0.1) LCB -28.18c P 5.83% WF 5.0 PSV 3 N 5 -- Q4 D3 D17

: Response: {"id":"badoverride","isDuringSearch":false,"moveInfos":[{"lcb":0.486046529,"move":"Q17","order":0,"prior":0.0873468071,"pv":["Q17","Q3","C16","D3"],"scoreLead":0.244669937,"scoreMean":0.244669937,"scoreSelfplay":0.283823611,"scoreStdev":30.5964027,"utility":0.0194314039,"utilityLcb":-0.0301491608,"visits":13,"winrate":0.503753873},{"lcb":0.472369076,"move":"D3","order":1,"prior":0.0843354836,"pv":["D3","R16","C16","Q3"],"scoreLead":0.356980532,"scoreMean":0.356980532,"scoreSelfplay":0.301336074,"scoreStdev":30.5359323,"utility":0.013312322,"utilityLcb":-0.0708087692,"visits":10,"winrate":0.502412323},{"lcb":0.478652514,"move":"Q3","order":2,"prior":0.0898618773,"pv":["Q3","R16","D3","D17"],"scoreLead":0.336632775,"scoreMean":0.336632775,"scoreSelfplay":0.219574824,"scoreStdev":30.4981717,"utility":0.00674066202,"utilityLcb":-0.0531871153,"visits":11,"winrate":0.500055291},{"lcb":0.467816644,"move":"C16","order":3,"prior":0.0821331814,"pv":["C16","Q3","C4","Q17"],"scoreLead":0.294962021,"scoreMean":0.294962021,"scoreSelfplay":0.183244657,"scoreStdev":30.4559867,"utility":0.00934610281,"utilityLcb":-0.0785536678,"visits":10,"winrate":0.499209419},{"lcb":0.460991056,"move":"R4","order":4,"prior":0.0889515132,"pv":["R4","R16","D3","D17"],"scoreLead":0.0682060713,"scoreMean":0.0682060713,"scoreSelfplay":-0.0438997565,"scoreStdev":30.580555,"utility":7.52266046e-05,"utilityLcb":-0.102053298,"visits":8,"winrate":0.497465529},{"lcb":0.447020369,"move":"D17","order":5,"prior":0.0799890161,"pv":["D17","D3","Q3","Q17"],"scoreLead":0.0218095677,"scoreMean":0.0218095677,"scoreSelfplay":-0.0447340323,"scoreStdev":30.5938338,"utility":-0.00108575889,"utilityLcb":-0.135518539,"visits":9,"winrate":0.495032076},{"lcb":0.417765676,"move":"C4","order":6,"prior":0.0860429108,"pv":["C4","R16","C16","Q3"],"scoreLead":0.0484061819,"scoreMean":0.0484061819,"scoreSelfplay":-0.0293904706,"scoreStdev":30.5187975,"utility":-0.00144332319,"utilityLcb":-0.220572512,"visits":7,"winrate":0.496026101},{"lcb":0.440007432,"move":"R16","order":7,"prior":0.0734403655,"pv":["R16","Q3","C4","D17"],"scoreLead":0.149068045,"scoreMean":0.149068045,"scoreSelfplay":0.098167625,"scoreStdev":30.5734559,"utility":0.00206229455,"utilityLcb":-0.158212292,"visits":7,"winrate":0.497248355},{"lcb":0.418102158,"move":"D4","order":8,"prior":0.0467210412,"pv":["D4","R16","C16","Q3"],"scoreLead":-0.00153968099,"scoreMean":-0.00153968099,"scoreSelfplay":-0.110048172,"scoreStdev":30.6087797,"utility":-0.00244866255,"utilityLcb":-0.215772476,"visits":6,"winrate":0.494289234},{"lcb":0.39513641,"move":"Q4","order":9,"prior":0.0582804717,"pv":["Q4","D3","D17"],"scoreLead":-0.0874934366,"scoreMean":-0.0874934366,"scoreSelfplay":-0.203119232,"scoreStdev":30.6637984,"utility":-0.00772052575,"utilityLcb":-0.281774406,"visits":5,"winrate":0.493012795},{"lcb":-0.539759232,"move":"D16","order":10,"prior":0.0466103293,"pv":["D16","D3","Q17"],"scoreLead":-0.423128655,"scoreMean":-0.423128655,"scoreSelfplay":-0.375178605,"scoreStdev":30.8506984,"utility":-0.00203272855,"utilityLcb":-2.89931947,"visits":3,"winrate":0.494986032},{"lcb":0.204316732,"move":"Q16","order":11,"prior":0.0390345268,"pv":["Q16","D3","D17"],"scoreLead":-0.118248108,"scoreMean":-0.118248108,"scoreSelfplay":-0.203899162,"scoreStdev":30.6889087,"utility":-0.00802204011,"utilityLcb":-0.814399047,"visits":4,"winrate":0.49230852},{"lcb":-0.509233154,"move":"C3","order":12,"prior":0.032418035,"pv":["C3","R16"],"scoreLead":-0.50300651,"scoreMean":-0.50300651,"scoreSelfplay":-0.481208861,"scoreStdev":30.7182236,"utility":-0.0195234983,"utilityLcb":-2.8,"visits":2,"winrate":0.490766846},{"lcb":-0.512627609,"move":"C17","order":13,"prior":0.0303994529,"pv":["C17","R16"],"scoreLead":-0.696764469,"scoreMean":-0.696764469,"scoreSelfplay":-0.665824383,"scoreStdev":30.7521139,"utility":-0.0275804033,"utilityLcb":-2.8,"visits":2,"winrate":0.487372391},{"lcb":-0.50508099,"move":"R3","order":14,"prior":0.019928446,"pv":["R3","R16"],"scoreLead":-0.308993541,"scoreMean":-0.308993541,"scoreSelfplay":-0.199929476,"scoreStdev":30.7235794,"utility":-0.00930872972,"utilityLcb":-2.8,"visits":2,"winrate":0.49491901}],"rootInfo":{"currentPlayer":"B","scoreLead":0.130163481,"scoreSelfplay":0.068932742,"scoreStdev":30.5844813,"symHash":"47E1EBDAE69A5DED3FF8DB1FA4E91845","thisHash":"47E1EBDAE69A5DED3FF8DB1FA4E91845","utility":0.00439348547,"visits":100,"winrate":0.498180364},"turnNumber":0}
: tests/models/g170-b6c96-s175395328-d26788732.bin.gz
: NN rows: 0
: NN batches: 0
: NN avg batch size: -nan
: GPU -1 finishing, processed 0 rows 0 batches
: NN rows: 93
: NN batches: 93
: NN avg batch size: 1
: GPU -1 finishing, processed 93 rows 93 batches
: All cleaned up, quitting
Loading

0 comments on commit 473e15a

Please sign in to comment.