ensembl.vep.runner.bench package#

Benchmark runners: the strategy matrix, whole runs, sweeps, and the Perl oracle.

Submodules#

ensembl.vep.runner.bench.common module#

Shared benchmark corpora, gates, and result handling.

ensembl.vep.runner.bench.common.corpora(config)[source]#

Keep each configured corpus alive while yielding its labelled overlaps.

Return type:

Iterator[list[tuple[str, list[TranscriptVariationAllele]]]]

ensembl.vep.runner.bench.common.gate(labelled)[source]#

Check every registered consequence strategy against the reference over every corpus, and log it.

Return type:

bool

ensembl.vep.runner.bench.common.policy(config)[source]#

Return the configured timing policy.

Return type:

TimingPolicy

ensembl.vep.runner.bench.common.record_results(config, results)[source]#

Write the results if asked, and compare them against a baseline if one was given.

Return type:

ExitCode

ensembl.vep.runner.bench.common.resolve_strategies(requested, default)[source]#

Return the requested strategies, or the registered defaults when none were asked for.

Raises:

ValueError – If a requested strategy is not registered.

Return type:

list[str]

ensembl.vep.runner.bench.common.run_info(config, verb)[source]#

Return what produced this run.

Return type:

RunInfo

ensembl.vep.runner.bench.common.table_format(config)[source]#

Return the table format the bench report asks for.

Raises:

ValueError – If a diagram format was asked for; a timing table has no diagram form.

Return type:

str

ensembl.vep.runner.bench.endtoend module#

End-to-end command-line benchmarks over exported corpora.

class ensembl.vep.runner.bench.endtoend.Runner(config)[source]#

Bases: object

End-to-end benchmark runner for full CLI configurations.

The gate runs first and compares outputs rather than in-memory terms: a configuration whose annotated VCF disagrees with the reference’s is not timed. Each run is a separate process given this working copy on PYTHONPATH, so what is measured is the tree the benchmark was started from.

Variables:
  • name (ClassVar[str]) – The registry name.

  • sections (ClassVar[tuple[str, ...]]) – The configuration sections read.

  • description (ClassVar[str]) – One-line description for the subcommand list.

description: ClassVar[str] = 'time whole command-line runs over a corpus on disk'#
name: ClassVar[str] = 'bench.endtoend'#
run()[source]#

Prepare the corpus, gate, measure, report, and clean up after itself.

Return type:

ExitCode

sections: ClassVar[tuple[str, ...]] = ('logging', 'corpus', 'bench', 'bench_endtoend')#

ensembl.vep.runner.bench.matrix module#

Strategy and cache benchmark matrix.

class ensembl.vep.runner.bench.matrix.Runner(config)[source]#

Bases: object

Benchmark runner for strategy and cache combinations.

cost/ctx and wall clock rank strategies differently on purpose: the cost is the number that survives a port to another language, while wall clock here is dominated by interpreter dispatch.

Variables:
  • name (ClassVar[str]) – The registry name.

  • sections (ClassVar[tuple[str, ...]]) – The configuration sections read.

  • description (ClassVar[str]) – One-line description for the subcommand list.

description: ClassVar[str] = 'time every strategy and cache configuration over a corpus'#
name: ClassVar[str] = 'bench.matrix'#
run()[source]#

Gate, measure, report, and record.

Return type:

ExitCode

sections: ClassVar[tuple[str, ...]] = ('logging', 'corpus', 'bench', 'bench_matrix')#

ensembl.vep.runner.bench.oracle module#

Case-by-case comparison with the Perl VariationEffect.pm oracle.

class ensembl.vep.runner.bench.oracle.Runner(config)[source]#

Bases: object

Oracle benchmark runner for Python and Perl strategies.

A disagreement is reported, never gated on: the oracle is the external reference, and the Perl script covers only four categories, so the question asked is whether our terms cover its terms.

Variables:
  • name (ClassVar[str]) – The registry name.

  • sections (ClassVar[tuple[str, ...]]) – The configuration sections read.

  • description (ClassVar[str]) – One-line description for the subcommand list.

description: ClassVar[str] = 'compare our strategies with the Perl VariationEffect.pm oracle'#
name: ClassVar[str] = 'bench.oracle'#
run()[source]#

Compare, time, report, and record.

Return type:

ExitCode

sections: ClassVar[tuple[str, ...]] = ('logging', 'bench', 'bench_oracle')#

ensembl.vep.runner.bench.sweep module#

Benchmarks across values of one numeric annotation setting.

class ensembl.vep.runner.bench.sweep.Runner(config)[source]#

Bases: object

Benchmark runner sweeping one setting across strategies.

Variables:
  • name (ClassVar[str]) – The registry name.

  • sections (ClassVar[tuple[str, ...]]) – The configuration sections read.

  • description (ClassVar[str]) – One-line description for the subcommand list.

description: ClassVar[str] = 'sweep one numeric annotation setting and time each value'#
name: ClassVar[str] = 'bench.sweep'#
run()[source]#

Sweep, report, and record.

Return type:

ExitCode

sections: ClassVar[tuple[str, ...]] = ('logging', 'corpus', 'bench', 'bench_sweep')#