SG++-Doxygen-Documentation
sgpp::datadriven::MPITaskScheduler Class Referenceabstract

#include <MPITaskScheduler.hpp>

Inheritance diagram for sgpp::datadriven::MPITaskScheduler:
sgpp::datadriven::RoundRobinScheduler

Public Member Functions

virtual void assignTaskStaticTaskSize (TaskType taskType, AssignTaskResult &result)=0
 Request for a task of specific type to be assigned. More...
 
virtual void assignTaskVariableTaskSize (TaskType taskType, AssignTaskResult &result)=0
 Request for a task of specific type to be assigned. More...
 
virtual bool isReadyForRefinement ()=0
 Check whether the master is allowed to transit into the refinement phase. More...
 
virtual void onMergeRequestIncoming (size_t batchOffset, size_t batchSize, size_t remoteGridVersion, size_t localGridVersion)=0
 Callback for when training results are received from workers. More...
 
virtual void onRefinementStarted ()=0
 Callback for when refinement is about to begin. More...
 
void setLearnerInstance (LearnerSGDEOnOffParallel *instance)
 Set the learner instance for which to task schedule. More...
 
virtual ~MPITaskScheduler ()=default
 Default destructor to override if necessary. More...
 

Protected Attributes

LearnerSGDEOnOffParallellearnerInstance {}
 The learner instance used to interrogate system state if necessary. More...
 

Constructor & Destructor Documentation

◆ ~MPITaskScheduler()

virtual sgpp::datadriven::MPITaskScheduler::~MPITaskScheduler ( )
virtualdefault

Default destructor to override if necessary.

Member Function Documentation

◆ assignTaskStaticTaskSize()

virtual void sgpp::datadriven::MPITaskScheduler::assignTaskStaticTaskSize ( TaskType  taskType,
AssignTaskResult result 
)
pure virtual

Request for a task of specific type to be assigned.

This type of task does not include variable task size.

Parameters
taskType
result

Implemented in sgpp::datadriven::RoundRobinScheduler.

Referenced by sgpp::datadriven::RefinementHandler::updateClassVariablesAfterRefinement().

◆ assignTaskVariableTaskSize()

virtual void sgpp::datadriven::MPITaskScheduler::assignTaskVariableTaskSize ( TaskType  taskType,
AssignTaskResult result 
)
pure virtual

Request for a task of specific type to be assigned.

The MPI Task Scheduler will decide on the task size.

Parameters
taskTypeThe type of the task to be assigned.
resultThe result of assigning the task.

Implemented in sgpp::datadriven::RoundRobinScheduler.

Referenced by sgpp::datadriven::LearnerSGDEOnOffParallel::assignBatchToWorker().

◆ isReadyForRefinement()

virtual bool sgpp::datadriven::MPITaskScheduler::isReadyForRefinement ( )
pure virtual

Check whether the master is allowed to transit into the refinement phase.

Returns
Whether to start refinement.

Implemented in sgpp::datadriven::RoundRobinScheduler.

Referenced by sgpp::datadriven::RefinementHandler::checkReadyForRefinement().

◆ onMergeRequestIncoming()

virtual void sgpp::datadriven::MPITaskScheduler::onMergeRequestIncoming ( size_t  batchOffset,
size_t  batchSize,
size_t  remoteGridVersion,
size_t  localGridVersion 
)
pure virtual

Callback for when training results are received from workers.

Can be used to update tracking of assigned batches.

Parameters
batchOffsetThe offset of the batch that was trained from.
batchSizeThe size of the batch used for training.
remoteGridVersionThe grid version of the worker used for training.
localGridVersionThe grid version of the master upond reception.

Implemented in sgpp::datadriven::RoundRobinScheduler.

Referenced by sgpp::datadriven::LearnerSGDEOnOffParallel::mergeAlphaValues().

◆ onRefinementStarted()

virtual void sgpp::datadriven::MPITaskScheduler::onRefinementStarted ( )
pure virtual

Callback for when refinement is about to begin.

Implemented in sgpp::datadriven::RoundRobinScheduler.

Referenced by sgpp::datadriven::LearnerSGDEOnOffParallel::trainParallel().

◆ setLearnerInstance()

void sgpp::datadriven::MPITaskScheduler::setLearnerInstance ( LearnerSGDEOnOffParallel instance)

Set the learner instance for which to task schedule.

Parameters
instanceThe learner instance.

References learnerInstance.

Referenced by sgpp::datadriven::LearnerSGDEOnOffParallel::LearnerSGDEOnOffParallel().

Member Data Documentation

◆ learnerInstance

LearnerSGDEOnOffParallel* sgpp::datadriven::MPITaskScheduler::learnerInstance {}
protected

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