Commit Graph
174 Commits
Author SHA1 Message Date
Andrew Grant 3fa1e2b984 Update permissions from a real linux box... 2023-11-16 21:34:00 -05:00
andrew 34f61092c7 Set base dir on startup like before 2023-11-16 21:28:33 -05:00
andrew a38fbf6cfb More permission for cutechess client 2023-11-16 21:12:42 -05:00
andrew 3986e8f497 chmod +X cutechess-ob; report downloading.
Tested with --clean
2023-11-16 21:03:09 -05:00
andrew bbe7cc25c1 Update cleanup.sh 2023-11-16 20:25:11 -05:00
andrew 77475b71be Minor fixes, functionally working now 2023-11-16 20:25:11 -05:00
andrew f5ce0de2ca Readd client.py 2023-11-16 20:25:11 -05:00
andrew 0799414b2c Delete client.py, to rename it lowercase.
Windows issues
2023-11-16 20:25:11 -05:00
andrew ec427d0ef2 Auto updating step 1 2023-11-16 20:25:11 -05:00
andrew 4ec9d5b529 First step towards auto-extracting client
client.py will pull from github, as requested by the server
client.py will extract and put all files locally ( except replacing itself ? )

Moved cutechess directly into the Client folder to it gets pulled.
May need to chmod +x the cutechess-ob for Linux on demand.

In the future, the cleanup script will delete everythinge except:
client.py, and any credentials.* files.
Such that one can run an openbench client in any directory, from a single file.
2023-11-16 20:25:11 -05:00
andrew 8c765ba0bb Bump Server/Client version to v18 2023-11-08 14:57:06 -05:00
andrew b3f8cc67af Add a heartbeat to the Client
Hits /clientHeartbeat/ when no data exists to report
May return a stop header to abort the workload
2023-11-08 14:56:10 -05:00
andrew 9f53b086c0 Additional testing and add Client output 2023-11-01 01:26:15 -04:00
andrew 4b054bab2f Remove python3.9+ features
Removes very clean use of :=
Removes use of .removesuffix()

Runs locally with python3.6, and the requirements.txt
2023-10-20 15:02:29 -04:00
andrew 957c042683 Adjust interim file names/paths to avoid conflicts
Use the Engine-Sha or Engine-Sha-Sha format for intermediate steps, to avoid conflicts with existing files and directories
2023-10-13 14:16:21 -04:00
Ciekce 3ef86eeb82 Strip dots and underscores from ISA extension names (#174) 2023-09-25 21:52:28 -04:00
andrew 36fc79487b Better client output; Kick to v17 2023-09-25 17:50:21 -04:00
andrew 81c5c9bfbc Kick Client/Server to v16 2023-09-20 12:48:07 -04:00
Andrew Grant 804b0a7126 Select Openings Better
Refer to https://github.com/AndyGrant/OpenBench/pull/168
2023-09-20 12:46:02 -04:00
andrew 37dfb585ad Kick Client/Server to v15 2023-09-20 10:49:24 -04:00
Andrew Grant a17b5f853d Add spsa_reporting_type and spsa_distribution_type (#170)
Reporting Method (BATCHED vs BULK) for SPSA Tests
Send everything at once, vs every time a pair finishes

Distribution Method (SINGLE vs MULTIPLE) for SPSA Tests
Give 1 parameter set; Give as many sets as we can
2023-09-20 10:48:15 -04:00
Andrew Grant ee267381fc Implement SPSA for OpenBench (#169)
* Support Worker and Thread Limits
* Drop report_rate from the Client
* Creation page
* WIP for SPSA; Lots of code shuffling to clean it up
* Able to create a Tune in the interface
* Start to work on a display page for Tunes
* Move all workload utilities to their own dir
* Ignore config files going forward
* Able to produce an SPSA test from the Server
* Round integers with probabilities that make sense
* Client side working
* Report as results come in, don't wait
* Fix workload size comment
* Cleanup and fix Tune modifications
* Adustment to random value in tuning
* Delete engine configs
2023-09-19 14:44:52 -04:00
andrew 111cbea187 Default Timemargin of 250ms
Grants a MoveOverhead baseline to reduce timelosses on noisy machines, in the event that the engine does not have its own internal MoveOverhead. This will mask timelosses on OpenBench, so be careful
2023-09-05 13:14:03 -04:00
andrew ddaeed8374 Critical bug fix when setting test.errors
Somehow in 10 years I've not yet encounted that in python the expression 3 or 3 evaluates to 3, and not True. This allowed for an attempt to save non-boolean values into the test.error field. Which produced seemingly infinite time losses on some tests I was running with some of the first versions of Torch to ever be on OpenBench.

Also, don't report time loss PGNS back. No one cares about them, and flagging the tests is annoying.
2023-08-31 04:16:37 -04:00
andrew 4116e795d0 Explicitly pkill engine processes
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
2023-08-30 23:42:13 -04:00
andrew a26e0f277a Use base NPS when doing cross-engine play
Creates a support for regression testing against a stable base, without dealing with variable NPS of the dev engine
2023-08-30 01:22:24 -04:00
andrew 4ed69d5dbc Pentanomial SPRT as the default 2023-08-21 18:52:02 -04:00
Andrew Grant a1f8efb55a Report all errors after workload is finished (#155)
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
2023-08-18 12:45:42 -04:00
Andrew Grant d32761c53c Overhaul Client Reporting mechanism (#153)
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.
2023-08-16 08:02:56 -04:00
andrew b09de3c815 Add pip reqs.txt for Server + Client 2023-07-24 17:03:09 -04:00
andrew 83f1629f6f Disable PGN error reporting
If an engine losses or crashes often enough, this produces issues. Will be resolved in Issue #132
2023-07-22 17:16:45 -04:00
andrew 7370530877 Stockfish for OpenBench 2023-07-22 16:48:43 -04:00
Andrew Grant 172bf76a50 Update Cutechess to better PGN reporting (#148)
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
2023-07-19 05:14:33 -04:00
Jay Honnold bd47ef9e7b Remove " from options as cutechess passes those literally 2023-07-15 13:44:17 -07:00
andrew c5624db867 Scale both engines the same way, but fix the formula 2023-07-15 04:19:30 -04:00
andrew 12c81c05dd Three different sets of changes in one commit
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
2023-07-14 21:12:29 -04:00
andrew 0c26329d69 Fix for cross-engine play regarding time scaling
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
2023-07-14 16:50:12 -04:00
andrew fd1fa723d5 Handle optimal builds; remove need for a naming convention
throw errors on bad jsons at start time of server
2023-06-26 06:48:56 -04:00
andrew ef1f23503b Engines have specific Operating Systems they support 2023-06-26 03:29:10 -04:00
andrew abb924a02b Support for N-Man Syzygy as an option 2023-06-26 03:00:41 -04:00
andrew 475bd058c7 Working version 2023-06-23 00:49:22 -04:00
andrew 5d1d703dfa Include dev+base NPS, send private field cleanly, more Client refactoring 2023-06-22 19:25:58 -04:00
andrew 824de3e0b5 WIP 2023-06-22 18:28:22 -04:00
andrew 802553269a Allow -I or --identity= to pass a nickname for a machine
Display this information on machines list, individual machine page, and on the error log
2023-06-21 00:25:23 -04:00
andrew 1ed71cb4a9 Bugfix for py-cpuinfo with some CPUs and Py versions
Python 3.11, on a 7B12, returns brand instead of brand_raw. Use this to ensure we don't error out, but also be resiliant to secondary definitions
2023-06-11 03:59:08 -04:00
andrew 9faa5c51aa Bugfix cross-engine, and time control parsing 2023-06-06 05:32:22 -04:00
andrew 01d99a86df Implement support for cross-engine play
Also support for time odds
2023-06-01 09:40:33 -04:00
andrew 329a955042 Style and remove ./ prefix 2023-05-19 09:58:01 -04:00
rafid-dev bbd68cb789 Delete machine.txt if error "Bad Machine Id" is thrown (#116) 2023-05-19 09:56:11 -04:00
andrew ec1b1c852b Fix reporting issue for game results 2023-05-17 05:48:32 -04:00