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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the thread type and frees any resources.Returns the predictor.void
Runs the work on theWorkerThread
and 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.ThreadConfig
Runs the work on theWorkerThread
and stores in the job.- Specified by:
run
in 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:
close
in classWorkerPoolConfig.ThreadConfig<I,
O>
-