utils.benchmark.vegas_benchmarks module¶
- class VegasBenchmarker(stratified=False, benchmark_time=False)[source]¶
Bases:
utils.benchmark.benchmarker.Benchmarker
Benchmark by comparing with VEGAS
- benchmark_method(d, integrand, integrator_config=None, integrand_params=None, n_batch=100000, keep_history=False, device=device(type='cpu'))[source]¶
Benchmarking class for comparing with VEGAS
- Parameters
d (int) –
integrand (utils.integrands.abstract.Integrand) –
integrator_config (dict) –
integrand_params (dict) –
n_batch (int) –
keep_history (bool) –
device (torch.device) –
- Returns
- Return type
- class VegasGridBenchmarker(n_repeat=1, stratified=False, benchmark_time=False)[source]¶
Bases:
utils.benchmark.benchmarker.GridBenchmarker
,utils.benchmark.vegas_benchmarks.VegasBenchmarker
Benchmark against VEGAS by sampling parameters on a grid
- Parameters
n (int) – Optional: How often the grid is sampled.
- class VegasRandomHPBenchmarker(n=5, n_repeat=1, stratified=False, benchmark_time=False)[source]¶
Bases:
utils.benchmark.benchmarker.RandomHyperparameterBenchmarker
,utils.benchmark.vegas_benchmarks.VegasBenchmarker
Benchmark against VEGAS by sampling integrator hyperparameters randomly
- Parameters
n_samples (int) – Number of random integrator configurations to draw
n_repeat (int) – Optional: How often the grid is sampled.
- class VegasSequentialBenchmarker(n_repeat=1, stratified=False, benchmark_time=False)[source]¶
Bases:
utils.benchmark.benchmarker.SequentialBenchmarker
,utils.benchmark.vegas_benchmarks.VegasBenchmarker
Benchmark against VEGAS by testing on a sequence of (dimension, integrand, integrator) triplets
- Parameters
n (int) – Optional: How often the grid is sampled.
- class VegasSequentialIntegratorBenchmarker(n_repeat=1, stratified=False, benchmark_time=False)[source]¶
Bases:
utils.benchmark.benchmarker.SequentialIntegratorBenchmarker
,utils.benchmark.vegas_benchmarks.VegasBenchmarker
Benchmark against VEGAS by testing on a sequence of integrator configurations
- Parameters
n (int) – Optional: How often the grid is sampled.