OpenBench spawns cutechess-ob(.exe), which can be killed.
Engines are named Engine-GITSHA(-NETSHA), and can be killed.
In theory, if you ran OpenBench at the same time as some other application, you could kill the wrong thing. But you would be ill advised to run an OpenBench Client while doing regular work on a machine. Likewise there is little to no reason to name your cutechess and engines in the same way as OpenBench.
Resolves https://github.com/AndyGrant/OpenBench/issues/162
Upon completion of the workload, parse all newly created PGN files for errors. We identify these by the Termination header. Any errors found are reported to the server.
Modify the PGN naming scheme to be more versatile; Name them as <test-id>.<result-id>.<cutechess-seed>.pgn. This makes it more easy to identify PGNs and their association with tests, if someone were to look at the raw files.
Commit some code, partially based on Kimmy's efforts, which will help process PGNs without the use of python-chess' PGN libs, which are far too slow.
Cleanup some interfaces which had far too much information on them
Delete some very ancient auto-approving code that only applied to the cross-approval case. Frankly no one is running OpenBench instances with cross-approval.
Display both the base and dev NPS on the machines page
Collects results as game-pairs, instead of as individual results. This removes some noise and bias that may have existed prior.
The master thread now handles all reporting to the OpenBench server. Help threads, ( one for each --nsockets or -N ), will place their results in a multiprocessing.Queue().
We will report report_rate-pairs at a time. However we will only report up to once every 30 seconds. This means we might batch report many many games at a time. This acts as a natural remedy to if someone were to have created an insanely short time control, or low nodes test. This will cause fixed-game tests to go over the cap. IE, a 40,000 game test is very likely to receive a small number of games above 40,000. Fixing these seems non-trivial, and also not important.
The Client also sends Pentanomial information to the server now. This information is not acted upon.
This involved a complete rewrite of how data (trinomial) information is extracted from Cutechess. It is predicated upon the assertion that cutechess pairs are sequential. IE, pair one will be game 1/2. Pair two will be games 3/4. Etc. This is the fundemental assertion that is in Fishtest, although very confusing to extract from observation.
Resolves an issue where the worker threads, spawned to run benchmarks, were not being killed, as .start() was not followed by a .join().
Makes more cleanly aborting threads, by explicitly murdering them with an abort_flag from threading.Event(). This speeds up killing workers that have multi-sockets. It also helps further protect us against Cutechess being left open.
Performs atomic transactions with the database for tests. This is critical for dealing with future SPSA efforts. Updates to Profile, individual Result, and Machine, are left as is. This is because Model.objects.filter().update() is atomic, and the contents of Results are hit by only 1-thread at a time, and Profile/Machine's updates do not matter.
Resolves#144 and then some.
Static compiles of Cutechess, with local changes, found here: https://github.com/AndyGrant/Cutechess
These changes include the Fischer Random Castling fixes that are found in the versions we use here. They also change the PGN reporting format, to output as { score depth/seldepth time-ms nodes}. This will be very useful for data collection, and if we ever need to debug a crash.
The process to build, including the static Qt5 libs, for Windows and for Linux, is taken from the Fishtest wiki, after talking with ppigazzini: https://github.com/glinscott/fishtest/wiki/Build-cutechess-with-Qt5-static
1. Fix the Networks API to handle duplicate Networks between engines
2. Modify end points to account for this ( breaks scripts and client )
3. Update Client to handle these changes
Engines should be scaled independently in cross-engine play regarding the NPS of the bench values. Self-play is still averaged, since there is an expectation that they are similar, and this is done to reduce noise
Private source engines must be located on Github.
All test branches must come from the same repo as stated in the config.
Repo must have an openbench.yml file that produces artifacts for the
workers.
Basic name scheme: windows-avx2-pext, linux-avx512-pext, ...
Desired artifacts can be set in the engine config under ['build']['artifacts']
Server must have a private key, housed in credentials.enginename.
Client must have a private key, housed in credentials.enginename.
enginename is lowercase and with spaces removed.
Private engines cannot build their NNUE files directly into them.
They must therefore support being run from the CMD line, with additional options.
Namely: ./engine "setoption name EvalFile value path/to/file" "bench" "quit".
Fall back to OPENBENCH_USERNAME and OPENBENCH_PASSWORD environment variables when username/password are not passed as command line arguments. Passing credentials in command line is problematic in multiuser machines, as full command lines may be visible in process listings.
Originally, we would have a TP value for each test. That value would determine how many games are played per workload. The server would then assign tests with equal probability of the same prio.
Now, all workload sizes are static (based on thread counts of the test and the machine), and TP is used to weight the resources allocated to a test. The server fill ensure 'fair' distribution of resources within a window of error, and place a priority on assigning machines with the same task they already had