Package ai.djl.serving.wlm.util
Class WlmConfigManager
java.lang.Object
ai.djl.serving.wlm.util.WlmConfigManager
This manages some configurations used by the
WorkLoadManager.-
Method Summary
Modifier and TypeMethodDescriptionintReturns the default batchSize for workers.static WlmConfigManagerReturns the singletonConfigManagerinstance.intReturns the default job queue size.Returns the devices the model will be loaded on at startup.intReturns the default max batch delay in milliseconds for the working queue.intReturns the default max idle time for workers.intReturns the default reserved memory in MB.booleanisDebug()Returns if debug is enabled.voidsetBatchSize(int batchSize) Sets the default batchSize for workers.voidsetJobQueueSize(int jobQueueSize) Sets the default job queue size.voidsetLoadOnDevices(String loadOnDevices) Sets the devices the model will be loaded on at startup.voidsetMaxBatchDelayMillis(int maxBatchDelayMillis) Sets the default max batch delay in milliseconds for the working queue.voidsetMaxIdleSeconds(int maxIdleSeconds) Sets the default max idle time in seconds for workers.voidsetReservedMemoryMb(int reservedMemoryMb) Sets the reserved memory in MB.
-
Method Details
-
getInstance
Returns the singletonConfigManagerinstance.- Returns:
- the singleton
ConfigManagerinstance
-
isDebug
public boolean isDebug()Returns if debug is enabled.- Returns:
trueif debug is enabled
-
getJobQueueSize
public int getJobQueueSize()Returns the default job queue size.- Returns:
- the default job queue size
-
setJobQueueSize
public void setJobQueueSize(int jobQueueSize) Sets the default job queue size.- Parameters:
jobQueueSize- the new default job queue size
-
getMaxIdleSeconds
public int getMaxIdleSeconds()Returns the default max idle time for workers.- Returns:
- the default max idle time
-
setMaxIdleSeconds
public void setMaxIdleSeconds(int maxIdleSeconds) Sets the default max idle time in seconds for workers.- Parameters:
maxIdleSeconds- the new default max idle time in seconds
-
getBatchSize
public int getBatchSize()Returns the default batchSize for workers.- Returns:
- the default max idle time
-
setBatchSize
public void setBatchSize(int batchSize) Sets the default batchSize for workers.- Parameters:
batchSize- the new default batchSize
-
getMaxBatchDelayMillis
public int getMaxBatchDelayMillis()Returns the default max batch delay in milliseconds for the working queue.- Returns:
- the default max batch delay in milliseconds
-
setMaxBatchDelayMillis
public void setMaxBatchDelayMillis(int maxBatchDelayMillis) Sets the default max batch delay in milliseconds for the working queue.- Parameters:
maxBatchDelayMillis- the new default max batch delay in milliseconds
-
getReservedMemoryMb
public int getReservedMemoryMb()Returns the default reserved memory in MB.- Returns:
- the default reserved memory in MB
-
setReservedMemoryMb
public void setReservedMemoryMb(int reservedMemoryMb) Sets the reserved memory in MB.- Parameters:
reservedMemoryMb- the reserved memory in MB
-
getLoadOnDevices
Returns the devices the model will be loaded on at startup.- Returns:
- the devices the model will be loaded on at startup
-
setLoadOnDevices
Sets the devices the model will be loaded on at startup.- Parameters:
loadOnDevices- thes the default model will be loaded on at startup
-