utils.benchmark.vegas_benchmarks module¶
- class VegasBenchmarker(*args, **kwargs)[source]¶
Bases:
utils.benchmark.benchmarker.BenchmarkerBenchmark by comparing with VEGAS
- benchmark_method(d, integrand, integrator_config=None, integrand_params=None, n_batch=100000, keep_history=False, device=device(type='cpu'), stratified=False)[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(*args, **kwargs)[source]¶
Bases:
utils.benchmark.benchmarker.GridBenchmarker,utils.benchmark.vegas_benchmarks.VegasBenchmarkerBenchmark against VEGAS by sampling parameters on a grid
- class VegasRandomHPBenchmarker(*args, **kwargs)[source]¶
Bases:
utils.benchmark.benchmarker.RandomHyperparameterBenchmarker,utils.benchmark.vegas_benchmarks.VegasBenchmarkerBenchmark against VEGAS by sampling integrator hyperparameters randomly
- Parameters
n_attempts (int) – Number of random integrator configurations to draw
- class VegasSequentialBenchmarker(*args, **kwargs)[source]¶
Bases:
utils.benchmark.benchmarker.SequentialBenchmarker,utils.benchmark.vegas_benchmarks.VegasBenchmarkerBenchmark against VEGAS by testing on a sequence of (dimension, integrand, integrator) triplets