Package ai.djl.serving.wlm
Class ModelInfo.ModelThread
java.lang.Object
ai.djl.serving.wlm.WorkerPoolConfig.ThreadConfig<I,O>
ai.djl.serving.wlm.ModelInfo.ModelThread
-
Field Summary
Fields inherited from class ai.djl.serving.wlm.WorkerPoolConfig.ThreadConfig
configJobs -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the thread type and frees any resources.Returns the predictor.voidRuns the work on theWorkerThreadand stores in the job.Methods inherited from class ai.djl.serving.wlm.WorkerPoolConfig.ThreadConfig
getConfigJobs
-
Constructor Details
-
ModelThread
protected ModelThread(ai.djl.Device device)
-
-
Method Details
-
run
Description copied from class:WorkerPoolConfig.ThreadConfigRuns the work on theWorkerThreadand stores in the job.- Specified by:
runin classWorkerPoolConfig.ThreadConfig<I,O> - Parameters:
jobs- the work input- Throws:
ai.djl.translate.TranslateException- if it failed to compute
-
getPredictor
Returns the predictor.- Returns:
- the predictor
-
close
public void close()Closes the thread type and frees any resources.- Specified by:
closein classWorkerPoolConfig.ThreadConfig<I,O>
-