Class GridBasedEnumerator
- java.lang.Object
-
- org.apache.sysds.resource.enumeration.Enumerator
-
- org.apache.sysds.resource.enumeration.GridBasedEnumerator
-
public class GridBasedEnumerator extends Enumerator
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.sysds.resource.enumeration.Enumerator
Enumerator.Builder, Enumerator.EnumerationStrategy, Enumerator.OptimizationStrategy
-
-
Field Summary
-
Fields inherited from class org.apache.sysds.resource.enumeration.Enumerator
COST_DELTA_FRACTION, DEFAULT_MAX_EXECUTORS, DEFAULT_MIN_EXECUTORS
-
-
Constructor Summary
Constructors Constructor Description GridBasedEnumerator(Enumerator.Builder builder, int stepSizeExecutors, int expBaseExecutors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArrayList<Integer>
estimateRangeExecutors(int driverCores, long executorMemory, int executorCores)
Estimates the minimum and maximum number of executors based on given VM instance characteristics, the enumeration strategy and the user-defined configurationsboolean
evaluateSingleNodeExecution(long driverMemory, int cores)
int
getExpBase()
Meant to be used for testing purposesint
getStepSize()
Meant to be used for testing purposesvoid
preprocessing()
Initializes the pool for driver and executor instances parsed at processing with all the available instances-
Methods inherited from class org.apache.sysds.resource.enumeration.Enumerator
getCostsWeightFactor, getDriverSpace, getEnumStrategy, getExecutorSpace, getInstances, getMaxPrice, getMaxTime, getOptimalSolution, getOptStrategy, postprocessing, processing, setCostsWeightFactor, setCpuQuota, setDriverSpace, setExecutorSpace, setMinPrice, setMinTime, updateOptimalSolution
-
-
-
-
Constructor Detail
-
GridBasedEnumerator
public GridBasedEnumerator(Enumerator.Builder builder, int stepSizeExecutors, int expBaseExecutors)
-
-
Method Detail
-
preprocessing
public void preprocessing()
Initializes the pool for driver and executor instances parsed at processing with all the available instances- Specified by:
preprocessing
in classEnumerator
-
evaluateSingleNodeExecution
public boolean evaluateSingleNodeExecution(long driverMemory, int cores)
- Specified by:
evaluateSingleNodeExecution
in classEnumerator
-
estimateRangeExecutors
public ArrayList<Integer> estimateRangeExecutors(int driverCores, long executorMemory, int executorCores)
Description copied from class:Enumerator
Estimates the minimum and maximum number of executors based on given VM instance characteristics, the enumeration strategy and the user-defined configurations- Specified by:
estimateRangeExecutors
in classEnumerator
- Parameters:
driverCores
- CPU cores for the currently evaluated driver nodeexecutorMemory
- memory of currently evaluated executor nodeexecutorCores
- CPU cores of currently evaluated executor node- Returns:
- - [min, max]
-
getStepSize
public int getStepSize()
Meant to be used for testing purposes- Returns:
- the set step size for the grid search
-
getExpBase
public int getExpBase()
Meant to be used for testing purposes- Returns:
- the set exponential base for the grid search
-
-