iops-benchmark 3.0.0__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 (62) hide show
  1. iops_benchmark-3.0.0/LICENSE +29 -0
  2. iops_benchmark-3.0.0/MANIFEST.in +10 -0
  3. iops_benchmark-3.0.0/PKG-INFO +401 -0
  4. iops_benchmark-3.0.0/README.md +361 -0
  5. iops_benchmark-3.0.0/docs/CACHE_USAGE.md +363 -0
  6. iops_benchmark-3.0.0/docs/CLAUDE.md +332 -0
  7. iops_benchmark-3.0.0/docs/README_original.md +347 -0
  8. iops_benchmark-3.0.0/docs/YAML_FORMAT.md +1307 -0
  9. iops_benchmark-3.0.0/docs/examples/README.md +459 -0
  10. iops_benchmark-3.0.0/docs/examples/example_bayesian.yaml +176 -0
  11. iops_benchmark-3.0.0/docs/examples/example_plafrim.yaml +120 -0
  12. iops_benchmark-3.0.0/docs/examples/example_plafrim_bayesian.yaml +193 -0
  13. iops_benchmark-3.0.0/docs/examples/example_simple.yaml +101 -0
  14. iops_benchmark-3.0.0/docs/examples/example_simple_rounds.yaml +106 -0
  15. iops_benchmark-3.0.0/docs/examples/scripts/ior_parser.py +38 -0
  16. iops_benchmark-3.0.0/docs/yaml_examples/01_simple_local.yaml +127 -0
  17. iops_benchmark-3.0.0/docs/yaml_examples/02_slurm_sweep.yaml +163 -0
  18. iops_benchmark-3.0.0/docs/yaml_examples/03_multi_round_optimization.yaml +198 -0
  19. iops_benchmark-3.0.0/docs/yaml_examples/README.md +150 -0
  20. iops_benchmark-3.0.0/iops/VERSION +1 -0
  21. iops_benchmark-3.0.0/iops/__init__.py +0 -0
  22. iops_benchmark-3.0.0/iops/config/__init__.py +45 -0
  23. iops_benchmark-3.0.0/iops/config/loader.py +876 -0
  24. iops_benchmark-3.0.0/iops/config/models.py +161 -0
  25. iops_benchmark-3.0.0/iops/execution/__init__.py +11 -0
  26. iops_benchmark-3.0.0/iops/execution/bayesian_planner.py +382 -0
  27. iops_benchmark-3.0.0/iops/execution/cache.py +341 -0
  28. iops_benchmark-3.0.0/iops/execution/executors/__init__.py +11 -0
  29. iops_benchmark-3.0.0/iops/execution/executors/base.py +99 -0
  30. iops_benchmark-3.0.0/iops/execution/executors/local.py +225 -0
  31. iops_benchmark-3.0.0/iops/execution/executors/slurm.py +502 -0
  32. iops_benchmark-3.0.0/iops/execution/matrix.py +928 -0
  33. iops_benchmark-3.0.0/iops/execution/planner.py +457 -0
  34. iops_benchmark-3.0.0/iops/execution/runner.py +794 -0
  35. iops_benchmark-3.0.0/iops/logger.py +81 -0
  36. iops_benchmark-3.0.0/iops/main.py +302 -0
  37. iops_benchmark-3.0.0/iops/reporting/__init__.py +1 -0
  38. iops_benchmark-3.0.0/iops/reporting/report_generator.py +1628 -0
  39. iops_benchmark-3.0.0/iops/results/__init__.py +10 -0
  40. iops_benchmark-3.0.0/iops/results/parser.py +82 -0
  41. iops_benchmark-3.0.0/iops/results/validation.py +55 -0
  42. iops_benchmark-3.0.0/iops/results/writer.py +236 -0
  43. iops_benchmark-3.0.0/iops/setup/__init__.py +5 -0
  44. iops_benchmark-3.0.0/iops/setup/templates.py +96 -0
  45. iops_benchmark-3.0.0/iops/setup/validators.py +149 -0
  46. iops_benchmark-3.0.0/iops/setup/wizard.py +118 -0
  47. iops_benchmark-3.0.0/iops_benchmark.egg-info/PKG-INFO +401 -0
  48. iops_benchmark-3.0.0/iops_benchmark.egg-info/SOURCES.txt +60 -0
  49. iops_benchmark-3.0.0/iops_benchmark.egg-info/dependency_links.txt +1 -0
  50. iops_benchmark-3.0.0/iops_benchmark.egg-info/entry_points.txt +2 -0
  51. iops_benchmark-3.0.0/iops_benchmark.egg-info/requires.txt +8 -0
  52. iops_benchmark-3.0.0/iops_benchmark.egg-info/top_level.txt +1 -0
  53. iops_benchmark-3.0.0/pyproject.toml +53 -0
  54. iops_benchmark-3.0.0/requirements-dev.txt +3 -0
  55. iops_benchmark-3.0.0/requirements.txt +8 -0
  56. iops_benchmark-3.0.0/setup.cfg +4 -0
  57. iops_benchmark-3.0.0/setup.py +58 -0
  58. iops_benchmark-3.0.0/tests/test_cache.py +220 -0
  59. iops_benchmark-3.0.0/tests/test_config.py +118 -0
  60. iops_benchmark-3.0.0/tests/test_executors.py +224 -0
  61. iops_benchmark-3.0.0/tests/test_integration.py +333 -0
  62. iops_benchmark-3.0.0/tests/test_matrix.py +134 -0
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2024, TADAAM - INRIA Bordeaux
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,10 @@
1
+ include README.md
2
+ include LICENSE
3
+ include requirements.txt
4
+ include requirements-dev.txt
5
+ recursive-include iops *.py
6
+ include iops/VERSION
7
+ recursive-include docs *.md *.yaml *.py *.txt
8
+ recursive-exclude * __pycache__
9
+ recursive-exclude * *.py[co]
10
+ recursive-exclude * .DS_Store
@@ -0,0 +1,401 @@
1
+ Metadata-Version: 2.4
2
+ Name: iops-benchmark
3
+ Version: 3.0.0
4
+ Summary: A generic benchmark orchestration framework for automated parametric experiments
5
+ Home-page: https://gitlab.inria.fr/lgouveia/iops
6
+ Author: TADAAM - INRIA Bordeaux
7
+ Author-email: TADAAM - INRIA Bordeaux <luan.teylo@inria.fr>
8
+ License-Expression: BSD-3-Clause
9
+ Project-URL: Homepage, https://gitlab.inria.fr/lgouveia/iops
10
+ Project-URL: Documentation, https://gitlab.inria.fr/lgouveia/iops
11
+ Project-URL: Repository, https://gitlab.inria.fr/lgouveia/iops
12
+ Project-URL: Issues, https://gitlab.inria.fr/lgouveia/iops/-/issues
13
+ Keywords: benchmark,performance,testing,parametric,sweep,hpc,slurm
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Topic :: Software Development :: Testing
18
+ Classifier: Topic :: System :: Benchmark
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Operating System :: POSIX :: Linux
24
+ Classifier: Operating System :: MacOS
25
+ Requires-Python: >=3.10
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ Requires-Dist: pyyaml
29
+ Requires-Dist: ruamel.yaml
30
+ Requires-Dist: psutil
31
+ Requires-Dist: sqlmodel
32
+ Requires-Dist: smt
33
+ Requires-Dist: scikit-optimize
34
+ Requires-Dist: pandas>=2.1.0
35
+ Requires-Dist: jinja2>=3.0.0
36
+ Dynamic: author
37
+ Dynamic: home-page
38
+ Dynamic: license-file
39
+ Dynamic: requires-python
40
+
41
+ # IOPS - I/O Performance Suite
42
+
43
+ **A generic benchmark orchestration framework for automated parametric experiments.**
44
+
45
+ IOPS automates the generation, execution, and analysis of benchmark experiments. Instead of writing custom scripts for each benchmark study, you define a YAML configuration describing what to vary, what to run, and what to measure—IOPS handles the rest.
46
+
47
+ ## What is IOPS?
48
+
49
+ IOPS (I/O Performance Suite) is a framework that transforms benchmark experiments from manual scripting into automated, reproducible workflows.
50
+
51
+ **Without IOPS**: Write bash scripts → Parse outputs → Aggregate data → Generate plots → Repeat for each parameter change
52
+
53
+ **With IOPS**: Write one YAML config → Run `iops config.yaml` → Get interactive HTML reports
54
+
55
+ Originally designed for I/O performance studies (see [our 2022 paper](https://inria.hal.science/hal-03753813/)), IOPS has evolved into a generic framework for any parametric benchmark workflow.
56
+
57
+ ## Key Features
58
+
59
+ - **Parameter Sweeping**: Automatically generate and execute tests for all parameter combinations
60
+ - **Multiple Search Strategies**: Exhaustive, Bayesian optimization, or random sampling
61
+ - **Execution Backends**: Run locally or submit to SLURM clusters
62
+ - **Smart Caching**: Skip redundant tests with parameter-aware result caching
63
+ - **Budget Control**: Set core-hour limits to avoid exceeding compute allocations
64
+ - **Automatic Reports**: Generate interactive HTML reports with plots and statistical analysis
65
+ - **Flexible Output**: Export results to CSV, Parquet, or SQLite
66
+
67
+ ## Installation
68
+
69
+ ### Prerequisites
70
+
71
+ - Python 3.10 or later
72
+ - For benchmark execution: Required tools in PATH (e.g., `ior`, `mpirun` for I/O benchmarks)
73
+ - For SLURM clusters: Access to a SLURM scheduler
74
+
75
+ ### Quick Installation (from PyPI - Coming Soon)
76
+
77
+ Once published to PyPI, you'll be able to install IOPS with a single command:
78
+
79
+ ```bash
80
+ pip install iops-benchmark
81
+ ```
82
+
83
+ ### Basic Installation (from source)
84
+
85
+ ```bash
86
+ # Clone the repository
87
+ git clone https://gitlab.inria.fr/lgouveia/iops.git
88
+ cd iops
89
+
90
+ # Install the package with dependencies
91
+ pip install .
92
+
93
+ # Verify installation
94
+ iops --version
95
+ ```
96
+
97
+ ### Development Installation
98
+
99
+ For development work, install in editable mode:
100
+
101
+ ```bash
102
+ # Clone the repository
103
+ git clone https://gitlab.inria.fr/lgouveia/iops.git
104
+ cd iops
105
+
106
+ # Install in editable mode
107
+ pip install -e .
108
+
109
+ # Verify installation
110
+ iops --version
111
+ ```
112
+
113
+ ### Using a Virtual Environment (Recommended)
114
+
115
+ Using a virtual environment keeps IOPS dependencies isolated from your system Python:
116
+
117
+ **Option 1: Python venv**
118
+
119
+ ```bash
120
+ # Create virtual environment
121
+ python3 -m venv iops_env
122
+
123
+ # Activate it
124
+ source iops_env/bin/activate # On Linux/Mac
125
+
126
+ # Install IOPS (from source)
127
+ pip install .
128
+
129
+ # Or for development
130
+ pip install -e .
131
+
132
+ # Verify installation
133
+ iops --version
134
+ ```
135
+
136
+ **Option 2: Conda**
137
+
138
+ ```bash
139
+ # Create conda environment
140
+ conda create -n iops python=3.10
141
+ conda activate iops
142
+
143
+ # Install IOPS (from source)
144
+ pip install .
145
+
146
+ # Or for development
147
+ pip install -e .
148
+
149
+ # Verify installation
150
+ iops --version
151
+ ```
152
+
153
+ ## Quick Start
154
+
155
+ ### 1. Create a Configuration
156
+
157
+ Generate a comprehensive YAML template with all options documented:
158
+
159
+ ```bash
160
+ iops --generate_setup my_config.yaml
161
+ ```
162
+
163
+ This creates a fully-commented template showing all available configuration options. Customize it for your needs.
164
+
165
+ Or start from an example:
166
+
167
+ ```bash
168
+ cp docs/examples/example_simple.yaml my_config.yaml
169
+ ```
170
+
171
+ ### 2. Preview Your Benchmark
172
+
173
+ ```bash
174
+ # Dry-run to see what will be executed
175
+ iops my_config.yaml --dry-run
176
+
177
+ # Check configuration validity
178
+ iops my_config.yaml --check_setup
179
+ ```
180
+
181
+ ### 3. Run the Benchmark
182
+
183
+ ```bash
184
+ # Basic execution
185
+ iops my_config.yaml
186
+
187
+ # With caching (skip already-executed tests)
188
+ iops my_config.yaml --use_cache
189
+
190
+ # With budget limit (SLURM only)
191
+ iops my_config.yaml --max-core-hours 1000
192
+
193
+ # With verbose logging
194
+ iops my_config.yaml --log_level DEBUG
195
+ ```
196
+
197
+ ### 4. Generate Analysis Report
198
+
199
+ ```bash
200
+ # Generate HTML report with interactive plots
201
+ iops analyze /path/to/workdir/run_001
202
+ ```
203
+
204
+ ## How It Works
205
+
206
+ IOPS follows a simple workflow:
207
+
208
+ 1. **Configuration**: Define variables to sweep, commands to run, and metrics to measure in a YAML file
209
+ 2. **Planning**: IOPS generates execution instances for parameter combinations
210
+ 3. **Execution**: Runs tests locally or submits SLURM jobs
211
+ 4. **Parsing**: Extracts metrics from output files using your parser script
212
+ 5. **Storage**: Saves results to CSV, SQLite, or Parquet
213
+ 6. **Analysis**: Generates HTML reports with interactive plots and statistics
214
+
215
+ ### Core Concepts
216
+
217
+ **Variables**: Parameters you want to vary
218
+
219
+ ```yaml
220
+ vars:
221
+ nodes:
222
+ type: int
223
+ sweep:
224
+ mode: list
225
+ values: [4, 8, 16, 32]
226
+ ```
227
+
228
+ **Commands**: What to execute (supports Jinja2 templating)
229
+
230
+ ```yaml
231
+ command:
232
+ template: "ior -w -b {{ block_size }}mb -o {{ output_file }}"
233
+ ```
234
+
235
+ **Metrics**: What to measure
236
+
237
+ ```yaml
238
+ metrics:
239
+ - name: bandwidth_mbps
240
+ - name: latency_ms
241
+ ```
242
+
243
+ **Search Methods**:
244
+ - `exhaustive`: Test all combinations (thorough, complete)
245
+ - `bayesian`: Gaussian Process optimization (efficient, finds optima faster)
246
+ - `random`: Random sampling (useful for statistical analysis)
247
+
248
+ ### Example Configuration
249
+
250
+ ```yaml
251
+ benchmark:
252
+ name: "My Benchmark Study"
253
+ workdir: "./workdir"
254
+ executor: "local" # or "slurm" for clusters
255
+ search_method: "exhaustive"
256
+ repetitions: 3
257
+
258
+ vars:
259
+ threads:
260
+ type: int
261
+ sweep:
262
+ mode: list
263
+ values: [1, 2, 4, 8]
264
+
265
+ buffer_size:
266
+ type: int
267
+ sweep:
268
+ mode: list
269
+ values: [4, 16, 64]
270
+
271
+ command:
272
+ template: "my_benchmark --threads {{ threads }} --buffer {{ buffer_size }}"
273
+
274
+ scripts:
275
+ - name: "benchmark"
276
+ parser:
277
+ file: "{{ execution_dir }}/output.json"
278
+ metrics:
279
+ - name: throughput
280
+ parser_script: scripts/parse_results.py
281
+
282
+ output:
283
+ sink:
284
+ type: csv
285
+ path: "{{ workdir }}/results.csv"
286
+ ```
287
+
288
+ ## SLURM Integration
289
+
290
+ IOPS provides native SLURM cluster support with automatic job submission, monitoring, and budget tracking:
291
+
292
+ ```yaml
293
+ benchmark:
294
+ executor: "slurm"
295
+ max_core_hours: 1000
296
+ cores_expr: "{{ nodes * processes_per_node }}"
297
+
298
+ scripts:
299
+ - name: "benchmark"
300
+ submit: "sbatch"
301
+ script_template: |
302
+ #!/bin/bash
303
+ #SBATCH --nodes={{ nodes }}
304
+ #SBATCH --ntasks-per-node={{ processes_per_node }}
305
+ #SBATCH --time=01:00:00
306
+
307
+ module load mpi/openmpi
308
+ {{ command.template }}
309
+ ```
310
+
311
+ Features:
312
+ - Automatic job submission and status monitoring
313
+ - Core-hours budget tracking and enforcement
314
+ - Multi-node resource allocation
315
+ - Graceful handling of job failures
316
+
317
+ ## Advanced Features
318
+
319
+ ### Result Caching
320
+
321
+ IOPS caches execution results to avoid redundant tests. Enable caching by specifying a SQLite database in your config:
322
+
323
+ ```yaml
324
+ benchmark:
325
+ sqlite_db: "/path/to/cache.db"
326
+ ```
327
+
328
+ Then use `--use_cache` to skip tests with identical parameters:
329
+
330
+ ```bash
331
+ iops config.yaml --use_cache
332
+ ```
333
+
334
+ ### Multi-Round Execution
335
+
336
+ Run experiments in stages with the `rounds` feature:
337
+
338
+ ```yaml
339
+ rounds:
340
+ - name: "explore"
341
+ sweep_vars: ["nodes"]
342
+ repetitions: 1
343
+
344
+ - name: "validate"
345
+ sweep_vars: ["nodes", "processes_per_node"]
346
+ repetitions: 5
347
+ ```
348
+
349
+ Best results from each round propagate to the next.
350
+
351
+ ### Budget Control
352
+
353
+ Prevent exceeding compute allocations:
354
+
355
+ ```bash
356
+ # Set budget limit from command line
357
+ iops config.yaml --max-core-hours 1000
358
+
359
+ # Or in YAML config
360
+ benchmark:
361
+ max_core_hours: 500
362
+ cores_expr: "{{ nodes * ppn }}"
363
+ ```
364
+
365
+ ## Examples
366
+
367
+ Check `docs/examples/` for working configuration examples:
368
+
369
+ - `example_simple.yaml` - Basic local execution
370
+ - `example_bayesian.yaml` - Bayesian optimization
371
+ - `example_plafrim.yaml` - SLURM cluster deployment
372
+ - `example_plafrim_bayesian.yaml` - Cluster with Bayesian search
373
+
374
+ ## Command Reference
375
+
376
+ ```bash
377
+ # Run benchmark
378
+ iops <config.yaml> [options]
379
+
380
+ # Common options:
381
+ --dry-run Preview without executing
382
+ --use_cache Skip cached tests
383
+ --max-core-hours N Budget limit (SLURM)
384
+ --log_level LEVEL Verbosity (DEBUG, INFO, WARNING)
385
+ --no-log-terminal Disable terminal logging (log to file only)
386
+ --check_setup Validate configuration
387
+
388
+ # Generate analysis report
389
+ iops analyze <workdir/run_NNN>
390
+
391
+ # Generate configuration template
392
+ iops --generate_setup [output.yaml]
393
+
394
+ # Show version
395
+ iops --version
396
+ ```
397
+
398
+ ## License
399
+
400
+ This project is developed at Inria. See LICENSE file for details.
401
+