WorkTrackingModel
- class pyapprox.interface.WorkTrackingModel(function, base_model=None, num_config_vars=0, enforce_timer_model=True)[source]
Bases:
object
Keep track of the wall time needed to evaluate a function.
Methods Summary
__call__
(samples[, return_grad])Evaluate self.function
cost_function
([config_samples])Retrun the cost of evaluating the functions with the ids given in a set of config_samples.
Methods Documentation
- __call__(samples, return_grad=False)[source]
Evaluate self.function
- Parameters:
- samplesnp.ndarray (nvars,nsamples)
Samples used to evaluate self.function
- Returns:
- valuesnp.ndarray (nsamples,nqoi)
The values of self.function. The last qoi returned by self.function (i.e. the last column of the output array of size (nsamples,nqoi+1) is the cost of the simulation. This column is not included in values.