Skip to content
cpbenchy 0.1.0.dev0 is in alpha: until version 1.0, commands, options, the Python API and the result format may still change. Pin the version you use.

Examples

Small, complete files to copy and adapt: plugins, loaders and scripts that show how to do common things with cpbenchy.

Updated View as Markdown

The repository’s examples/ directory has small, complete examples: plugins, loaders and scripts. Unlike the library, they don’t come with cpbenchy. Each is one file, meant to be copied and changed for your own experiments, and each shows how to do something you will want to do your own way, such as scoring, storing or analysing. The test suite runs all of them, so they work as shown.

Using an example

Use an example from a clone of the repository, as it is:

Or copy the file into your own project, change it, and pass your copy instead. For how plugins and loaders work, see writing an observer and writing a loader.

The library’s own observers are worth reading too: src/cpbenchy/observers.py shows live output from the worker (on_solution), final output (on_finish), files per run (ctx.artifact), a check in the parent after each run (on_result), and changing a run’s status (CheckSolutions).

Navigation

Type to search…

↑↓ navigate↵ selectEsc close