PoolModel

class pyapprox.models.wrappers.PoolModel(function, max_eval_concurrency, assert_omp=True, base_model=None)[source]

Bases: object

Methods Summary

__call__(samples)

Evaluate a function at multiple samples in parallel using multiprocessing.Pool

set_max_eval_concurrency(max_eval_concurrency)

Set the number of threads used to evaluate the function

Methods Documentation

__call__(samples)[source]

Evaluate a function at multiple samples in parallel using multiprocessing.Pool

Parameters
samplesnp.ndarray (nvars,nsamples)

Samples used to evaluate self.function

set_max_eval_concurrency(max_eval_concurrency)[source]

Set the number of threads used to evaluate the function

Parameters
max_eval_concurrencyinteger

The maximum number of simulations that can be run in parallel. Should be no more than the maximum number of cores on the computer being used