AutoPas  3.0.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
autopas::TuningStrategyInterface Class Referenceabstract

Interface for tuning strategies for the auto tuner. More...

#include <TuningStrategyInterface.h>

Inheritance diagram for autopas::TuningStrategyInterface:
Inheritance graph
[legend]

Public Member Functions

virtual TuningStrategyOption getOptionType () const =0
 Get this object's associated TuningStrategyOption type.
 
virtual void addEvidence (const Configuration &configuration, const Evidence &evidence)
 Notifies the strategy about empirically collected information for the given configuration.
 
virtual bool optimizeSuggestions (std::vector< Configuration > &configQueue, const EvidenceCollection &evidenceCollection)=0
 Optimizes the queue of configurations to process.
 
virtual bool reset (size_t iteration, size_t tuningPhase, std::vector< Configuration > &configQueue, const autopas::EvidenceCollection &evidenceCollection)=0
 Reset all internal parameters to the beginning of a new tuning phase.
 
virtual bool needsLiveInfo () const
 Returns whether this tuning strategy wants to get a LiveInfo object passed before a new tuning phase.
 
virtual void receiveLiveInfo (const LiveInfo &info)
 Virtual method that subclasses can override to receive the LiveInfo object before a tuning phase if they return true in needsLiveInfo().
 
virtual void rejectConfiguration (const Configuration &configuration, bool indefinitely)
 Notify the strategy about a configuration that is (currently) invalid and thus can potentially be dropped from some internal storage.
 
virtual bool needsDomainSimilarityStatistics () const
 Indicate whether the strategy needs domain similarity statistics.
 
virtual void receiveDomainSimilarityStatistics (double pdBinStdDevDensity, double pdBinMaxDensity)
 Method to pass smoothed domain similarity statistics (particle-dependent bin standard deviation in density and max density) to the tuning strategy.
 

Detailed Description

Interface for tuning strategies for the auto tuner.

Member Function Documentation

◆ addEvidence()

virtual void autopas::TuningStrategyInterface::addEvidence ( const Configuration configuration,
const Evidence evidence 
)
inlinevirtual

Notifies the strategy about empirically collected information for the given configuration.

All evidence is stored centrally in the AutoTuner and its EvidenceCollection is passed to the tuning strategies during optimization.

Implementing this function is only necessary if the tuning strategy processes evidence differently than EvidenceCollection.

Parameters
configurationConfiguration used to obtain the evidence.
evidenceMeasurement and when it was taken.

Reimplemented in autopas::ActiveHarmony, autopas::BayesianClusterSearch, autopas::BayesianSearch, autopas::FuzzyTuning, autopas::PredictiveTuning, autopas::RandomSearch, autopas::RuleBasedTuning, and autopas::TuningStrategyLogger.

◆ getOptionType()

virtual TuningStrategyOption autopas::TuningStrategyInterface::getOptionType ( ) const
pure virtual

◆ needsDomainSimilarityStatistics()

virtual bool autopas::TuningStrategyInterface::needsDomainSimilarityStatistics ( ) const
inlinevirtual

Indicate whether the strategy needs domain similarity statistics.

Returns

Reimplemented in autopas::ActiveHarmony, autopas::BayesianClusterSearch, autopas::BayesianSearch, and autopas::MPIParallelizedStrategy.

◆ needsLiveInfo()

virtual bool autopas::TuningStrategyInterface::needsLiveInfo ( ) const
inlinevirtual

Returns whether this tuning strategy wants to get a LiveInfo object passed before a new tuning phase.

Returns
True, if this tuning strategy wants a LiveInfo object passed before a new tuning phase via receiveLiveInfo().

Reimplemented in autopas::FuzzyTuning, autopas::RuleBasedTuning, and autopas::TuningStrategyLogger.

◆ optimizeSuggestions()

virtual bool autopas::TuningStrategyInterface::optimizeSuggestions ( std::vector< Configuration > &  configQueue,
const EvidenceCollection evidenceCollection 
)
pure virtual

Optimizes the queue of configurations to process.

This function is called once before each iteration in a tuning phase so all tuning strategies can give their input on which configuration to try next. This is done by reordering configQueue so that the next configuration to try is at the end (FIFO).

Parameters
configQueueQueue of configurations to be tested. The tuning strategy should edit this queue.
evidenceCollectionAll collected evidence until now.
Returns
boolean value to signal if the tuning strategy has intentionally wiped the config queue

Implemented in autopas::ActiveHarmony, autopas::BayesianClusterSearch, autopas::BayesianSearch, autopas::FuzzyTuning, autopas::MPIParallelizedStrategy, autopas::PredictiveTuning, autopas::RandomSearch, autopas::RuleBasedTuning, autopas::SlowConfigFilter, autopas::SortByName, and autopas::TuningStrategyLogger.

◆ receiveDomainSimilarityStatistics()

virtual void autopas::TuningStrategyInterface::receiveDomainSimilarityStatistics ( double  pdBinStdDevDensity,
double  pdBinMaxDensity 
)
inlinevirtual

Method to pass smoothed domain similarity statistics (particle-dependent bin standard deviation in density and max density) to the tuning strategy.

See LiveInfo::gather for meaning of particle dependent bin.

Parameters
pdBinStdDevDensityparticle-dependent bin density standard deviation.
pdBinMaxDensityparticle-dependent bin maximum density.

Reimplemented in autopas::MPIParallelizedStrategy.

◆ receiveLiveInfo()

virtual void autopas::TuningStrategyInterface::receiveLiveInfo ( const LiveInfo info)
inlinevirtual

Virtual method that subclasses can override to receive the LiveInfo object before a tuning phase if they return true in needsLiveInfo().

Parameters
infoA new LiveInfo object that has already gathered its information.

Reimplemented in autopas::RuleBasedTuning, autopas::TuningStrategyLogger, and autopas::FuzzyTuning.

◆ rejectConfiguration()

virtual void autopas::TuningStrategyInterface::rejectConfiguration ( const Configuration configuration,
bool  indefinitely 
)
inlinevirtual

Notify the strategy about a configuration that is (currently) invalid and thus can potentially be dropped from some internal storage.

Parameters
configuration
indefinitelyWhether the given configuration will never be valid

Reimplemented in autopas::BayesianClusterSearch, autopas::BayesianSearch, autopas::MPIParallelizedStrategy, and autopas::PredictiveTuning.

◆ reset()

virtual bool autopas::TuningStrategyInterface::reset ( size_t  iteration,
size_t  tuningPhase,
std::vector< Configuration > &  configQueue,
const autopas::EvidenceCollection evidenceCollection 
)
pure virtual

Reset all internal parameters to the beginning of a new tuning phase.

This can also mean to reorder the configQueue to some initially expected state.

Parameters
iterationGives the current iteration to the tuning strategy.
tuningPhaseGives the current tuning phase to the tuning strategy.
configQueueQueue of configurations to be tested. The tuning strategy should edit this queue.
evidenceCollectionAll collected evidence until now.
Returns
boolean value to signal if the tuning strategy has intentionally wiped the config queue

Implemented in autopas::ActiveHarmony, autopas::BayesianClusterSearch, autopas::BayesianSearch, autopas::FuzzyTuning, autopas::MPIParallelizedStrategy, autopas::PredictiveTuning, autopas::RuleBasedTuning, autopas::TuningStrategyLogger, autopas::SlowConfigFilter, autopas::SortByName, and autopas::RandomSearch.


The documentation for this class was generated from the following file: