Declarative campaigns ===================== A specification describes a whole campaign — the grid, the link as a list of blocks, the metrics, the stopping rule, the outputs and the expected results — in a YAML, JSON or TOML file (or a Python ``dict``). :func:`comnum.run_spec` runs it on the parallel Rust runner; the same file runs from the command line with ``comnum run``. .. code-block:: python import comnum results = comnum.run_spec(""" name: qam_awgn seed: 2024 grid: m: [4, 16, 64] ebn0_db: {from: 0, to: 20, step: 2} link: - {type: source, constellation: {kind: qam, m: $m}, n_symbols: 4096} - {type: awgn_ebn0, ebn0_db: $ebn0_db} metrics: {report: [ber, ser]} stop: {min_errors: {ber: 200}, min_trials: 128, max_trials: 4000} callbacks: skip_below: {metric: ber, threshold: 1e-6, along: ebn0_db} """) results[0]["condition"], results[0]["metrics"]["ber"] Every result is a ``dict`` with the condition, the status, the number of trials and every metric with its value and confidence interval (``value``, ``lo``, ``hi``). - ``profile: true`` (or ``run_spec(spec, profile=True)``, ``comnum run --profile``) times every block, reported as the metrics ``