potassco-benchmark-tool 2.2.0__tar.gz → 2.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/PKG-INFO +1 -1
  2. potassco_benchmark_tool-2.2.2/docs/getting_started/gen/runscript.md +425 -0
  3. potassco_benchmark_tool-2.2.2/docs/reference/encoding_support.md +116 -0
  4. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/pyproject.toml +1 -1
  5. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/src/benchmarktool/result/xlsx_gen.py +12 -9
  6. potassco_benchmark_tool-2.2.2/src/benchmarktool/runscript/parser.py +377 -0
  7. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/src/benchmarktool/runscript/runscript.py +39 -18
  8. potassco_benchmark_tool-2.2.2/src/benchmarktool/runscript/schemas/benchmark_spec.xsd +62 -0
  9. potassco_benchmark_tool-2.2.2/src/benchmarktool/runscript/schemas/runscript.xsd +292 -0
  10. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/src/potassco_benchmark_tool.egg-info/PKG-INFO +1 -1
  11. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/src/potassco_benchmark_tool.egg-info/SOURCES.txt +5 -0
  12. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/ref/runscripts/test_runscript.xml +12 -7
  13. potassco_benchmark_tool-2.2.2/tests/ref/test_bench/spec.xml +13 -0
  14. potassco_benchmark_tool-2.2.2/tests/ref/test_foldered/test_folder/spec.xml +5 -0
  15. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/result/test_xlsx_gen.py +11 -3
  16. potassco_benchmark_tool-2.2.2/tests/runscript/__init__.py +0 -0
  17. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/runscript/test_runscript_classes.py +65 -10
  18. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/runscript/test_runscript_parser.py +62 -26
  19. potassco_benchmark_tool-2.2.0/docs/getting_started/gen/runscript.md +0 -356
  20. potassco_benchmark_tool-2.2.0/docs/reference/encoding_support.md +0 -104
  21. potassco_benchmark_tool-2.2.0/src/benchmarktool/runscript/parser.py +0 -578
  22. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/.envrc +0 -0
  23. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/.github/workflows/deploy.yml +0 -0
  24. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/.github/workflows/doc.yml +0 -0
  25. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/.github/workflows/test.yml +0 -0
  26. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/.gitignore +0 -0
  27. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/.pre-commit-config.yaml +0 -0
  28. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/CONTRIBUTING.md +0 -0
  29. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/LICENSE +0 -0
  30. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/README.md +0 -0
  31. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/_custom/css/extra.css +0 -0
  32. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/_custom/css/mkdoclingo.css +0 -0
  33. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/_custom/css/mkdocstrings.css +0 -0
  34. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/_custom/javascripts/mathjax.js +0 -0
  35. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/_custom/overrides/.icons/potassco-full-logo.svg +0 -0
  36. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/_custom/overrides/.icons/potassco-logo.svg +0 -0
  37. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/_custom/overrides/partials/logo.html +0 -0
  38. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/assets/images/potassco-full-logo.svg +0 -0
  39. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/assets/images/potassco-logo-dark.svg +0 -0
  40. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/assets/images/potassco-logo.svg +0 -0
  41. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/community/CONTRIBUTING.md +0 -0
  42. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/community/help.md +0 -0
  43. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/community/index.md +0 -0
  44. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/examples/index.md +0 -0
  45. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/getting_started/conv/index.md +0 -0
  46. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/getting_started/eval/index.md +0 -0
  47. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/getting_started/gen/index.md +0 -0
  48. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/getting_started/gen/templates.md +0 -0
  49. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/getting_started/index.md +0 -0
  50. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/getting_started/init/index.md +0 -0
  51. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/getting_started/run_dist/index.md +0 -0
  52. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/getting_started/verify/index.md +0 -0
  53. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/getting_started/workflow/index.md +0 -0
  54. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/index.md +0 -0
  55. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/reference/api/entry_points.md +0 -0
  56. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/reference/api/index.md +0 -0
  57. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/reference/api/result/index.md +0 -0
  58. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/reference/api/result/parser.md +0 -0
  59. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/reference/api/result/result.md +0 -0
  60. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/reference/api/result/xlsx_gen.md +0 -0
  61. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/reference/api/resultparser.md +0 -0
  62. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/reference/api/runscript/index.md +0 -0
  63. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/reference/api/runscript/parser.md +0 -0
  64. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/reference/api/runscript/runscript.md +0 -0
  65. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/reference/api/tools.md +0 -0
  66. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/reference/index.md +0 -0
  67. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/docs/reference/resultparser.md +0 -0
  68. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/mkdocs.yml +0 -0
  69. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/mount-zip +0 -0
  70. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/noxfile.py +0 -0
  71. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/setup.cfg +0 -0
  72. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/src/benchmarktool/__init__.py +0 -0
  73. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/src/benchmarktool/entry_points.py +0 -0
  74. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/src/benchmarktool/init/programs/gcat.sh +0 -0
  75. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/src/benchmarktool/init/runscripts/runscript-all.xml +0 -0
  76. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/src/benchmarktool/init/runscripts/runscript-dist.xml +0 -0
  77. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/src/benchmarktool/init/runscripts/runscript-example.xml +0 -0
  78. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/src/benchmarktool/init/runscripts/runscript-seq.xml +0 -0
  79. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/src/benchmarktool/init/templates/seq-generic.sh +0 -0
  80. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/src/benchmarktool/init/templates/single.dist +0 -0
  81. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/src/benchmarktool/result/__init__.py +0 -0
  82. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/src/benchmarktool/result/ipynb_gen.py +0 -0
  83. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/src/benchmarktool/result/parser.py +0 -0
  84. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/src/benchmarktool/result/result.py +0 -0
  85. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/src/benchmarktool/resultparser/__init__.py +0 -0
  86. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/src/benchmarktool/resultparser/clasp.py +0 -0
  87. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/src/benchmarktool/runscript/__init__.py +0 -0
  88. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/src/benchmarktool/tools.py +0 -0
  89. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/src/potassco_benchmark_tool.egg-info/dependency_links.txt +0 -0
  90. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/src/potassco_benchmark_tool.egg-info/entry_points.txt +0 -0
  91. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/src/potassco_benchmark_tool.egg-info/requires.txt +0 -0
  92. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/src/potassco_benchmark_tool.egg-info/top_level.txt +0 -0
  93. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/__init__.py +0 -0
  94. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/py.typed +0 -0
  95. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/ref/README.md +0 -0
  96. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/ref/out/x.txt +0 -0
  97. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/ref/results/clasp_error/runsolver.solver +0 -0
  98. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/ref/results/clasp_error/runsolver.watcher +0 -0
  99. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/ref/results/finished/runsolver.solver +0 -0
  100. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/ref/results/finished/runsolver.watcher +0 -0
  101. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/ref/results/memout/runsolver.solver +0 -0
  102. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/ref/results/memout/runsolver.watcher +0 -0
  103. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/ref/results/missing/x.txt +0 -0
  104. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/ref/results/timeout/runsolver.solver +0 -0
  105. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/ref/results/timeout/runsolver.watcher +0 -0
  106. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/ref/runscripts/invalid_runscript.xml +0 -0
  107. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/ref/runscripts/invalid_xml.xml +0 -0
  108. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/ref/test_bench/.invalid.file +0 -0
  109. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/ref/test_bench/test_f1.2.1.lp +0 -0
  110. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/ref/test_bench/test_f1.2.2.lp +0 -0
  111. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/ref/test_bench/test_f2.lp +0 -0
  112. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/ref/test_bench/test_folder/test_foldered.lp +0 -0
  113. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/ref/test_disttemplate.dist +0 -0
  114. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/ref/test_eval.xml +0 -0
  115. /potassco_benchmark_tool-2.2.0/tests/result/__init__.py → /potassco_benchmark_tool-2.2.2/tests/ref/test_foldered/test_folder/instance.lp +0 -0
  116. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/ref/test_template.sh +0 -0
  117. {potassco_benchmark_tool-2.2.0/tests/resultparser → potassco_benchmark_tool-2.2.2/tests/result}/__init__.py +0 -0
  118. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/result/test_ipynb_gen.py +0 -0
  119. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/result/test_result_classes.py +0 -0
  120. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/result/test_result_parser.py +0 -0
  121. {potassco_benchmark_tool-2.2.0/tests/runscript → potassco_benchmark_tool-2.2.2/tests/resultparser}/__init__.py +0 -0
  122. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/resultparser/test_result_parser.py +0 -0
  123. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/test_entry.py +0 -0
  124. {potassco_benchmark_tool-2.2.0 → potassco_benchmark_tool-2.2.2}/tests/test_tools.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: potassco-benchmark-tool
3
- Version: 2.2.0
3
+ Version: 2.2.2
4
4
  Summary: A benchmark-tool for ASP based systems.
5
5
  Author: Roland Kaminski, Tom Schmidt
6
6
  License: MIT License
@@ -0,0 +1,425 @@
1
+ ---
2
+ title: "Runscripts for Benchmarking"
3
+ ---
4
+
5
+ A runscript defines all aspects of a benchmark set and the systems used to run
6
+ it. The following sections explain each part of a typical runscript, helping
7
+ you adapt an existing runscript or create a new one from scratch.
8
+
9
+ Various runscripts can be found on the [examples] page.
10
+
11
+ ## Runscript Elements
12
+
13
+ A runscript element is defined as follows:
14
+
15
+ ```xml
16
+ <runscript output="output-folder">
17
+ ...
18
+ </runscript>
19
+ ```
20
+
21
+ The `output` attribute specifies the top-level folder where all scripts and
22
+ results will be stored.
23
+
24
+
25
+ ### Machine Elements
26
+
27
+ The `runscript` element can contain any number of `machine` elements:
28
+
29
+ ```xml
30
+ <machine name="hpc" cpu="24x8xE5520@2.27GHz" memory="24GB"/>
31
+ ```
32
+
33
+ The attributes are:
34
+
35
+ - `name`: Identifies the machine.
36
+ - `cpu`: Describes the machine's CPU.
37
+ - `memory`: Describes the available memory.
38
+
39
+ !!! info
40
+ The `cpu` and `memory` attributes are for informational purposes only.
41
+
42
+ ### Folder Structure
43
+
44
+ When running the `gen` subcommand with a runscript, the following folder
45
+ structure is created:
46
+
47
+ ```text
48
+ <output>
49
+ └─ <project>
50
+ └─ <machine>
51
+ └─ results
52
+ └─ <benchmark-set>
53
+ └─ <sytem-name>-<system-version>-<setting>
54
+ ├─ <benchclass>
55
+ │ ├─ <instance>
56
+ │ │ ├─ <run>
57
+ │ │ ├─ ...
58
+ │ │ └─ <run>
59
+ │ ├─ ...
60
+ │ └─ <instance>
61
+ │ └─ ...
62
+ ├─ ...
63
+ └─ <benchclass>
64
+ └─ ...
65
+ ```
66
+
67
+ 1. The name of the top-level folder is set by the `output` attribute of the
68
+ `runscript` element.
69
+ 2. The second folder in the hierarchy represents the project (explained later).
70
+ 3. The third folder is named after the machine on which the benchmark is run.
71
+ This folder contains the start scripts for launching the benchmark and the
72
+ resulting output files.
73
+
74
+
75
+ ## Configuration
76
+
77
+ Configurations are used to reference run templates. You can define any number
78
+ of configurations:
79
+
80
+ ```xml
81
+ <config name="seq-generic" template="templates/seq-generic.sh"/>
82
+ ```
83
+
84
+ For more information, see the [template][run template] page.
85
+
86
+ ## System
87
+
88
+ Systems are defined as follows:
89
+
90
+ ```xml
91
+ <system name="clingo" version="5.8.0" measures="clingo" config="seq-generic"
92
+ cmdline="--stats">
93
+ ...
94
+ </system>
95
+ ```
96
+
97
+ - `name` and `version`: Together, specify the name of an executable or script
98
+ `<name>-<version>`, which must be placed in the `./programs` directory. For
99
+ example, the solver referenced by the [run template] in the configuration is
100
+ `./programs/clingo-5.8.0`. You can freely modify this script as needed.
101
+ - `measures`: The name of the [result parser] used to evaluate benchmark
102
+ results. This does not affect script generation.
103
+ - `config`: The configuration to use for running this system.
104
+ - `cmdline` (optional): Any string to be passed to the system, regardless of
105
+ the setting.
106
+ - `cmdline_post` (optional): Like `cmdline`, but placed after `setting.cmdline`
107
+ in the argument order.
108
+
109
+ A runscript can contain any number of systems, each with any number of
110
+ settings.
111
+
112
+ ### Setting
113
+
114
+ Settings are identified by their `name` and define additional arguments and
115
+ encodings used by the system.
116
+
117
+ ```xml
118
+ <setting name="setting-1" cmdline="--quiet=1,0" tag="basic">
119
+ <encoding file="encodings/default.lp"/>
120
+ <encoding file="extra.lp" tag="extra"/>
121
+ </setting>
122
+ ```
123
+
124
+ A `setting` element can have the following optional attributes:
125
+
126
+ - `cmdline`: Any valid string, passed to the system after `system.cmdline` when
127
+ this setting is selected.
128
+ - `cmdline_post`: Like `cmdline`, but placed after `system.cmdline_post` in the
129
+ argument order.
130
+ - `tag`: A space-separated identifier used within the runscript to select
131
+ multiple settings at once.
132
+ - Each setting can contain any number of `encoding` elements:
133
+ - `file`: A relative path from the directory where `btool gen` is run to the encoding file.
134
+ - If no `tag` is given, the encoding is passed to the system for all instances when this
135
+ setting is selected.
136
+ - If a `tag` is given, encoding usage is instance-dependent. Multiple encodings can
137
+ be selected by using the same tag.
138
+ - `dist_template`: The default value is `templates/single.dist`, which refers
139
+ to [single.dist]. This attribute is only relevant for distributed jobs. More information
140
+ about dist templates can be found on the [templates] page.
141
+ - `dist_options`: Allows one to add additional options for distributed jobs.
142
+ `dist_options` expects a comma-separated string of options. For example,
143
+ `dist_options="#SBATCH --hint=compute_bound,#SBATCH -J=%x.%j.out"` results in the
144
+ following lines being added to the script:
145
+
146
+ ```bash
147
+ #SBATCH --hint=compute_bound
148
+ #SBATCH -J=%x.%j.out
149
+ ```
150
+
151
+ The default template for distributed jobs uses SLURM; a comprehensive list of available
152
+ options is provided in the [SLURM documentation].
153
+
154
+ To summarize, the command-line arguments are always given to the system-under-test in
155
+ the following order:
156
+
157
+ ```
158
+ system.cmdline setting.cmdline system.cmdline_post setting.cmdline_post
159
+ ```
160
+
161
+ ## Job
162
+
163
+ A job defines additional arguments for individual runs. You can define any number of jobs.
164
+ There are two types: sequential jobs (`seqjob`) and distributed jobs (`distjob`) for
165
+ running benchmarks on a cluster.
166
+
167
+ ### Sequential Jobs
168
+
169
+ A sequential job is identified by its `name` and sets the `timeout` (in seconds) for a
170
+ single run, the number of `runs` for each instance, and the number of solver processes
171
+ executed in `parallel`. The optional attribute `memout` sets a memory limit (in MB) for
172
+ each run. If no limit is set, a default limit of 20 GB is used. Additional options, which
173
+ will be passed to the runlim call, can be set using the optional `template_options`
174
+ attribute. `template_options` expects a comma-separated string of options, e.g.
175
+ `template_options="--single,--report-rate=2000"`.
176
+
177
+ ```xml
178
+ <seqjob name="seq-gen" timeout="900" runs="1" memout="1000" template_options="--single" parallel="1"/>
179
+ ```
180
+
181
+ ### Distributed Jobs
182
+
183
+ A distributed job is also identified by its `name` and defines a `timeout`, the number
184
+ of `runs`, and an optional `memout` and `template_options`:
185
+
186
+ ```xml
187
+ <distjob name="dist-gen" timeout="900" runs="1" memout="1000" template_options="--single"
188
+ script_mode="timeout" walltime="23h 59m 59s" cpt="4"/>
189
+ ```
190
+
191
+ Additionally, a distributed job has the following attributes:
192
+
193
+ - `walltime`: Sets an overall time limit for all runs in `[0-9]+d [0-9]+h [0-9]+m [0-9]+s`
194
+ format. Each value is optional and can be any positive integer. For example, `12d 350s`
195
+ sets the time to 12 days and 350 seconds. Alternatively, a single value without a unit is
196
+ interpreted as seconds.
197
+ - `script_mode`: Defines how runs are grouped and dispatched to the cluster.
198
+ - `multi`: Dispatches all runs individually for maximum parallelization. (In this
199
+ mode, the walltime is ignored.)
200
+ - `timeout`: Dispatches groups of runs based on the `timeout` and `walltime` of the
201
+ distributed job. Runs are gathered into groups such that the total time for each
202
+ group is below the specified `walltime`. For example, if the `walltime` is 25 hours
203
+ and you have 100 instances with a `timeout` of 1 hour each and 1 run each, there
204
+ will be 4 groups of 25 runs each, which are dispatched separately.
205
+ - `partition`: (Optional) Specifies the cluster partition name. The default is `kr`.
206
+ Other values include `short` and `long`. If `short` is used, the walltime cannot exceed
207
+ 24 hours. Note that these values depend on your cluster configuration.
208
+
209
+ !!! info
210
+ If you have many runs, `script_mode=multi` can cause issues with the cluster's
211
+ scheduler. Use `timeout` or dispatch the generated `.dist` jobs using `btool run-dist`.
212
+
213
+ ## Benchmark Sets
214
+
215
+ The `benchmark` element defines a group of benchmark instances, organized into classes
216
+ to be run by systems. It is identified by its `name` and can contain any number of
217
+ `folder` or `files` elements or alternatively any number of `spec` elements:
218
+
219
+ ```xml
220
+ <benchmark name="no-pigeons">
221
+ ...
222
+ </benchmark>
223
+ ```
224
+
225
+ ### Folder Elements
226
+
227
+ A `folder` element defines a `path` to a folder containing instances, which is
228
+ searched recursively. Each sub-folder containing instances is treated as a
229
+ benchmark class, and results are separated accordingly:
230
+
231
+ ```xml
232
+ <folder path="benchmarks/clasp" encoding_tag="tag1" group="true">
233
+ <ignore prefix="pigeons"/>
234
+ <encoding file="encodings/no-pigeons.lp"/>
235
+ </folder>
236
+ ```
237
+
238
+ A `folder` element can have the following optional attributes:
239
+
240
+ - `encoding_tag`: Selects encodings with matching tags in setting definitions. These
241
+ encodings are used with all instances in this folder when the corresponding setting
242
+ is run. See the [encoding support] page for more details.
243
+ - `group`: A Boolean attribute (default is `false`). If enabled, instance files in the
244
+ same folder with the form `<instance>.<extension>` sharing the same prefix `<instance>`
245
+ are grouped together and passed to the system. For example, files `inst1.1.lp` and
246
+ `inst1.2.lp` in the same folder would be grouped as `inst1`.
247
+
248
+ A `folder` element can contain any number of `encoding` and `ignore` elements:
249
+
250
+ - `ignore`: Excludes folders from the benchmark by defining a path `prefix` to be ignored.
251
+ - `encoding`: Specifies encodings to be used with all instances in the folder.
252
+
253
+ ### File Elements
254
+
255
+ Instead of using a `folder` element to gather benchmark instances, you can also
256
+ manually add specific files using the `files` element:
257
+
258
+ ```xml
259
+ <files path="benchmarks/clasp" encoding_tag="tag1 tag2">
260
+ <encoding file="default.lp"/>
261
+ <add file="dir/inst1.lp" group="group1"/>
262
+ <add file="dir/inst2.lp" group="group1"/>
263
+ </files>
264
+ ```
265
+
266
+ The `files` element supports the following optional attributes:
267
+
268
+ - `path`: Specifies the folder containing the instances to be added.
269
+ - `encoding_tag`: Works the same way as for the `folder` element.
270
+
271
+ The `files` element can contain any number of `encoding` and `add` elements:
272
+
273
+ - `add`: Specifies a file to be added to the benchmark. The `file` attribute gives the
274
+ path to the instance relative to the `path` attribute of its parent `files` element.
275
+ - `group`: Instance files can optionally be grouped together using the `group` attribute.
276
+ Groups of instances must be located in the same directory and are passed together to
277
+ the system.
278
+
279
+ ### Spec Elements
280
+
281
+ Alternatively, `spec` elements can be used to load benchmark specifications
282
+ from `spec.xml` files.
283
+
284
+ ```xml
285
+ <spec path="benchmarks/clasp" instance_tag="tag1 | tag2 tag3"/>
286
+ ```
287
+
288
+ The `spec` element has the following attributes:
289
+
290
+ - `path`: Specifies a folder to be recursively searched for any `spec.xml` files.
291
+ Once a `spec.xml` file is found, the search does not continue deeper. For example,
292
+ in the structure below, the last `spec.xml` file inside `subfolder` is ignored:
293
+
294
+ ```xml
295
+ benchmarks/clasp
296
+ ├── folder1
297
+ │ ├── ins1.lp
298
+ │ └── spec.xml
299
+ └── folder2
300
+ ├── ins2.lp
301
+ ├── spec.xml
302
+ └── subfolder
303
+ ├── ins2-1.lp
304
+ └── spec.xml
305
+ ```
306
+
307
+ - `instance_tag` (optional): Specifies which groups of instances to include for the
308
+ current benchmark. Tag groups are separated by `|`, and tags within a group are
309
+ separated by spaces. For example, `tag1 | tag2 tag3` selects instances that either
310
+ have `tag1` or both `tag2` and `tag3` together. Instances with only `tag2` or `tag3`
311
+ are not included. If the special tag `*all*` is used or `instance_tag` is not set,
312
+ all instances are included regardless of their tags.
313
+
314
+ #### Spec Files
315
+
316
+ A `spec.xml` file can be used to specify benchmark instances, similar to the
317
+ benchmark element in the runscript. Here is an example of a `spec.xml` with all features:
318
+
319
+ ```xml
320
+ <spec>
321
+ <class name="folder" encoding_tag="encTag">
322
+ <folder path="test_folder" instance_tag="tagA" group="true"/>
323
+ <folder path="other_folder"/>
324
+ <encoding file="enc1.lp"/>
325
+ </class>
326
+ <class name="instances">
327
+ <instance file="test_f1.2.1.lp" instance_tag="tagB" group="test_f1"/>
328
+ <instance file="test_f1.2.2.lp" instance_tag="tagB" group="test_f1"/>
329
+ <instance file="test_folder/test_foldered.lp" instance_tag="tagB tagA"/>
330
+ <instance file="test_f2.lp" instance_tag="tagC"/>
331
+ </class>
332
+ </spec>
333
+ ```
334
+
335
+ Each `spec.xml` file contains a single `spec` root element, which may include any number
336
+ of `class` elements. Every `class` element must have a `name` attribute and may
337
+ optionally include an `encoding_tag` attribute.
338
+
339
+ For instances defined in the runscript, the benchmark class is determined by the
340
+ folder containing the instance. In contrast,
341
+ for instances defined in a `spec.xml` file, the benchmark class is constructed by combining
342
+ the relative path from the `path` attribute of the corresponding `spec` element in the
343
+ runscript to the location of the `spec.xml` file, together with the `name` attribute
344
+ of the `class` element.
345
+ For example, with the `spec` element and folder structure from the section above,
346
+ if the `spec.xml` file located in `folder1` contains a `class` element named
347
+ `class_name`, the benchmark class for its instances will be `folder1/class_name`.
348
+
349
+ The `encoding_tag` attribute can be used to assign setting-dependent encodings to
350
+ the instances. See the [encoding support] page for more information.
351
+
352
+ Each `class` element can contain any number of `folder`, `instance`, and `encoding`
353
+ elements. These function the same as those defined in the benchmark element in the
354
+ runscript. The only differences are that all paths are now relative to the `spec.xml`
355
+ file, and the `folder` and `instance` elements each also have an `instance_tag`
356
+ attribute. These tags allow for a selection of instances using the `instance_tag`
357
+ attribute of the `spec` element described above.
358
+
359
+
360
+ ## Projects
361
+
362
+ Projects combine all previous elements to define a complete benchmark setup.
363
+
364
+ ```xml
365
+ <project name="clingo-basic" job="seq-gen">
366
+ ...
367
+ </project>
368
+ ```
369
+
370
+ A `project` element includes the following attributes:
371
+
372
+ - `name`: Uniquely identifies the project and determines the name of the second
373
+ folder in the output structure.
374
+ - `job`: References a previously defined job to use as a template for the benchmark.
375
+
376
+ Projects can be defined in two ways: with `runtag` elements or `runspec` elements.
377
+ A project may contain any number of both.
378
+
379
+ ### Runtag Elements
380
+
381
+ The `runtag` element specifies a machine and benchmark set to run:
382
+
383
+ ```xml
384
+ <runtag machine="hpc" benchmark="no-pigeons" tag="basic"/>
385
+ ```
386
+
387
+ It has the following attributes:
388
+
389
+ - `machine`: References a previously defined machine.
390
+ - `benchmark`: References a previously defined benchmark set.
391
+ - `tag` (optional): Specifies one or more setting tags to use. Only settings with
392
+ matching tag groups are selected. Tag groups are separated by `|`, and tags within
393
+ a group are separated by spaces. For example, `tag1 | tag2 tag3` selects instances
394
+ that either have `tag1` or both `tag2` and `tag3` together. Instances with only
395
+ `tag2` or `tag3` are not included. If the special tag `*all*` is used or `tag` is
396
+ not set, all instances are included regardless of their tags.
397
+
398
+ In the example above, all instances defined in the `no-pigeons` benchmark are
399
+ run using the `seq-gen` job configuration on machine `hpc`, once for each setting
400
+ with the tag `basic`.
401
+
402
+ ### Runspec Elements
403
+
404
+ A `project` element can also include one or more `runspec` elements to explicitly
405
+ specify a single machine, benchmark, system, version, and setting to use:
406
+
407
+ ```xml
408
+ <runspec machine="hpc" benchmark="no-pigeons" system="clingo" version="5.8.0"
409
+ setting="setting-1"/>
410
+ ```
411
+
412
+ The attributes are as follows:
413
+
414
+ - `machine`: References a previously defined machine.
415
+ - `benchmark`: References a previously defined benchmark set.
416
+ - `system` and `version`: Reference a previously defined system.
417
+ - `setting`: References a previously defined setting of the selected system.
418
+
419
+ [run template]: ./templates.md#run-templates
420
+ [result parser]: ../../reference/resultparser.md
421
+ [single.dist]: https://github.com/potassco/benchmark-tool/blob/master/templates/single.dist
422
+ [templates]: templates.md#dist-templates
423
+ [examples]: ../../examples/index.md#runscripts
424
+ [SLURM documentation]: https://slurm.schedmd.com/sbatch.html
425
+ [encoding support]: ../../reference/encoding_support.md
@@ -0,0 +1,116 @@
1
+ ---
2
+ title: "Encoding Support"
3
+ icon: "material/file-code"
4
+ ---
5
+
6
+ # Encoding Support
7
+
8
+
9
+ Given a basic template:
10
+
11
+ ```bash
12
+ {run.solver} {run.args} {run.file} {runs.encodings}
13
+ ```
14
+
15
+ The default behaviour of a benchmark is to simply execute the system with each instance:
16
+
17
+ ```bash
18
+ <system> <arguments> <instance>
19
+ ```
20
+
21
+ ## Instance-dependent encodings
22
+
23
+ It is possible to use specific encodings depending on the instance by defining them
24
+ inside the corresponding [`benchmark`](../getting_started/gen/runscript.md#benchmark-sets)
25
+ element in the runscript, more specifically inside the `folder` and `files` child-elements.
26
+
27
+ Any number of `encoding` elements can be defined. These encodings will be used together
28
+ with all instances inside the given `folder` or `files`.
29
+
30
+ For example, consider the following benchmark element:
31
+ ```xml
32
+ <benchmark name="bench">
33
+ <folder path="default-folder"/>
34
+ <folder path="with-encoding">
35
+ <encoding file="folder-encoding.lp"/>
36
+ <encoding file="helper.lp"/>
37
+ </folder>
38
+ <files path="other-folder">
39
+ <add file="some-file.lp"/>
40
+ <encoding file="file-encoding.lp"/>
41
+ </files>
42
+ </benchmark>
43
+ ```
44
+ There are three cases to distinguish:
45
+
46
+ - All instances inside the default folder are run as above.
47
+ - All instances inside the `with-encoding` directory are executed as:
48
+ `<system> <arguments> <instance> folder-encoding.lp helper.lp`
49
+ - The instance `other-folder/some-file.lp` is executed as:
50
+ `<system> <arguments> <instance> file-encoding.lp`
51
+
52
+ !!! info
53
+ The examples above use simplified paths for readability.
54
+
55
+
56
+
57
+ ## Setting-dependent encodings
58
+
59
+ It is also possible to use specific encodings depending on the setting used by defining
60
+ them inside the corresponding [`setting`](../getting_started/gen/runscript.md#setting)
61
+ element and referencing them inside the
62
+ [`benchmark`](../getting_started/gen/runscript.md#benchmark-sets) element.
63
+
64
+ Any number of `encoding` elements can be defined. These will be used with all
65
+ instances using the given setting, or—if an `encoding_tag` is given—only with
66
+ instances that have a matching tag.
67
+
68
+ Consider the following example settings:
69
+ ```xml
70
+ <system name="clingo" version="1.0.0" measures="clasp" config="seq-generic">
71
+ <setting name="s0"/>
72
+ <setting name="s1">
73
+ <encoding file="def.lp"/>
74
+ <encoding file="enc11a.lp" encoding_tag="tag"/>
75
+ <encoding file="enc11b.lp" encoding_tag="tag"/>
76
+ </setting>
77
+ <setting name="s2">
78
+ <encoding file="enc21.lp" encoding_tag="tag"/>
79
+ <encoding file="enc22.lp" encoding_tag="tag2"/>
80
+ </setting>
81
+ </system>
82
+ ```
83
+ And a slightly modified benchmark element:
84
+ ```xml
85
+ <benchmark name="bench">
86
+ <folder path="default-folder"/>
87
+ <folder path="with-encoding" encoding_tag="tag">
88
+ <encoding file="folder-encoding.lp"/>
89
+ <encoding file="helper.lp"/>
90
+ </folder>
91
+ <files path="other-folder" encoding_tag="tag2">
92
+ <add file="some-file.lp"/>
93
+ <encoding file="file-encoding.lp"/>
94
+ </files>
95
+ </benchmark>
96
+ ```
97
+ This results in the following runs:
98
+
99
+ - With setting `s0`, nothing changes compared to the instance-dependent example.
100
+ - With setting `s1`:
101
+ - For all instances inside the `default-folder`:
102
+ `clingo-1.0.0 <arguments> <instance> def.lp`
103
+ - For all instances inside the `with-encoding` directory (tag: `tag`):
104
+ `clingo-1.0.0 <arguments> <instance> folder-encoding.lp helper.lp def.lp enc11a.lp enc11b.lp`
105
+ - For instance `other-folder/some-file.lp` (tag: `tag2`):
106
+ `clingo-1.0.0 <arguments> <instance> file-encoding.lp def.lp`
107
+ - With setting `s2`:
108
+ - For all instances inside the default folder:
109
+ `clingo-1.0.0 <arguments> <instance>`
110
+ - For all instances inside the `with-encoding` directory (tag: `tag`):
111
+ `clingo-1.0.0 <arguments> <instance> folder-encoding.lp helper.lp enc21.lp`
112
+ - For instance `other-folder/some-file.lp` (tag: `tag2`):
113
+ `clingo-1.0.0 <arguments> <instance> file-encoding.lp enc22.lp`
114
+
115
+ !!! info
116
+ The examples above use simplified paths for readability.
@@ -44,7 +44,7 @@ btool = "benchmarktool.entry_points:main"
44
44
  where = ["src"]
45
45
 
46
46
  [tool.setuptools.package-data]
47
- benchmarktool = ["init/**/*"]
47
+ benchmarktool = ["init/**/*", "runscript/schemas/*"]
48
48
 
49
49
  [tool.setuptools_scm]
50
50
  version_scheme = "python-simplified-semver"
@@ -382,14 +382,14 @@ class Sheet:
382
382
  instance_summary[instance_result].setdefault(name, False)
383
383
  if value_type == "int":
384
384
  value_type = "float"
385
- elif value_type not in {"float", "None"}:
385
+ elif value_type not in {"float", "None", "empty"}:
386
386
  value_type = "string"
387
387
  if self.ref_sheet is None:
388
388
  if value_type == "float":
389
389
  block.add_cell(
390
390
  instance_result.instance.values["row"] + run.number - 1, name, value_type, float(value)
391
391
  )
392
- elif value_type == "None":
392
+ elif value_type in {"None", "empty"}:
393
393
  block.add_cell(
394
394
  instance_result.instance.values["row"] + run.number - 1, name, value_type, np.nan
395
395
  )
@@ -438,7 +438,7 @@ class Sheet:
438
438
  )
439
439
  else:
440
440
  block.add_cell(
441
- (inst_val["row"] + inst_val["max_runs"]) // inst_val["max_runs"] - 1, name, "empty", np.nan
441
+ (inst_val["row"] + inst_val["max_runs"]) // inst_val["max_runs"] - 1, name, "None", np.nan
442
442
  )
443
443
 
444
444
  def add_benchclass_summary(
@@ -468,7 +468,7 @@ class Sheet:
468
468
  },
469
469
  )
470
470
  else:
471
- block.add_cell(benchclass_result.benchclass.values["row"], name, "empty", np.nan)
471
+ block.add_cell(benchclass_result.benchclass.values["row"], name, "None", np.nan)
472
472
 
473
473
  def finish(self) -> None:
474
474
  """
@@ -523,16 +523,16 @@ class Sheet:
523
523
  self.values = self.values.reindex(index=self.content.index, columns=self.content.columns)
524
524
  self.values = self.values.combine_first(self.content)
525
525
  else:
526
- self.values = (
527
- self.content.iloc[2 : self.result_offset - 1, 1:].combine_first(self.values).combine_first(self.content)
528
- )
526
+ self.values = self.content.copy()
529
527
 
530
528
  # defragmentation (temporary workaround)
531
529
  self.content = self.content.copy()
532
530
  self.values = self.values.copy()
533
531
 
534
532
  # add summaries
533
+ self.values = self.values.replace({None: np.nan})
535
534
  self.add_row_summary(col)
535
+ self.values = self.values.replace({None: np.nan})
536
536
  self.add_col_summary()
537
537
 
538
538
  # color cells
@@ -583,6 +583,7 @@ class Sheet:
583
583
  float_occur (dict[str, Any]): Dict containing column references of float columns.
584
584
  col (int): Current column index.
585
585
  """
586
+ self.values[col] = self.values[col].astype(object)
586
587
  for row in range(self.result_offset - 2):
587
588
  ref_range = ",".join(get_cell_index(col_ref, row + 2, True) for col_ref in sorted(float_occur[measure]))
588
589
  values = np.array(self.values.loc[2 + row, sorted(float_occur[measure])], float)
@@ -922,12 +923,14 @@ class SystemBlock:
922
923
  """
923
924
  if name not in self.columns:
924
925
  self.content.at[1, name] = name
926
+ # force correct dtype
927
+ self.content[name] = self.content[name].astype(object)
925
928
  self.columns[name] = value_type
926
929
  # first occurrence of column
927
- elif self.columns[name] == "None":
930
+ elif self.columns[name] in {"None", "empty"}:
928
931
  self.columns[name] = value_type
929
932
  # mixed system column
930
- elif value_type not in (self.columns[name], "None"):
933
+ elif value_type not in {self.columns[name], "None", "empty"}:
931
934
  self.columns[name] = "string"
932
935
  # leave space for header and add new row if necessary
933
936
  if row + 2 not in self.content.index: