Managing Runs
Results are saved after every answer, so a run can be interrupted, extended or partly redone. DIR below means a run folder, such as results/MODEL/YYYYMMDD-HHMMSS.
Resume an interrupted run
Press Ctrl+C to stop. Continue with the same options as before, including the total number of runs:
python3 codebench.py --runs 3 --resume DIR
Answers lost to request errors are asked again. After three failed requests in a row the script stops by itself; fix the server and resume.
Add more runs
To grow a finished run from 5 to 10 answers per task, resume it with the new total. Only runs 6 to 10 are asked:
python3 codebench.py --runs 10 --resume DIR
Do not start a new run for this: --compare reads only the latest run of each model, so a new folder would replace the old one instead of adding to it.
What must stay the same
--resume refuses to continue when any of these differ from the stored run:
- model and server sampling settings;
- request overrides, seed and system prompt;
--max-tokens,--task-timeout,--time-scaleand loop detection;- C# target, benchmark version and the content of the tasks.
--force continues despite different settings or tasks and records the differences; it does not override an incompatible benchmark version. A different llama.cpp build or server command is accepted and noted.
List, remove and redo answers
To redo an answer, for example one slowed down by something else on your machine, list the records, remove them by number and resume:
python3 codebench.py --records DIR
python3 codebench.py --records DIR --remove 77
python3 codebench.py --runs 5 --resume DIR
--remove accepts numbers, ranges and lists, such as 34-107 or 3,7,34-107. All numbers refer to the same listing. --remove-run takes the same syntax and removes every answer of whole runs:
python3 codebench.py --records DIR --remove-run 6-10
The previous results.json is saved as results.json.bak.
Migrate to a newer version
When a new version changes only some tasks, an old run can be reused. --migrate copies it to DIR-vVERSION without the answers of the changed tasks and leaves the original untouched. Resuming the copy asks only those:
python3 codebench.py --migrate DIR
python3 codebench.py --runs 5 --resume DIR-vVERSION
Not every version can be migrated; the script tells you when it cannot.